@@ -169,18 +169,16 @@ OS_DEBUG=true OS_BUILD_PLATFORMS=linux/amd64 make
169
169
# note that you can build for mulitiple platforms with:
170
170
make build-cross
171
171
```
172
- But the ` make ` step is included in the ` Dockerfile ` , so this does not need to be done manually.
173
- You can instead simply build the container image and push the it to your own registry:
172
+ But the build step is included in the ` Dockerfile.rhel7 ` , so this does not need to be done manually.
173
+ You can instead simply build the container image and push it to your own registry:
174
174
175
175
``` bash
176
176
# the pattern is:
177
- docker build -t < registry> /< your-username> /console-operator:< version> .
178
- # following : docker.io/openshift/origin-console-operator:latest
177
+ docker build -f Dockerfile.rhel7 - t < registry> /< your-username> /console-operator:< version>
178
+ # conforming to : docker.io/openshift/origin-console-operator:latest
179
179
# for development, you are going to push to an alternate registry.
180
- # specifically it can look something like this:
181
- docker build -f Dockerfile.rhel7 -t quay.io/benjaminapetersen/console-operator:latest .
182
180
```
183
- You can optionally build a specific version .
181
+ Note: If you are running on macOS, you need to pass the --platform linux/amd64 flag to the Docker build command .
184
182
185
183
Then, push your image:
186
184
@@ -189,30 +187,16 @@ docker push <registry>/<your-username>/console-operator:<version>
189
187
# Be sure your repository is public else the image will not be able to be pulled later
190
188
docker push quay.io/benjaminapetersen/console-operator:latest
191
189
```
192
- Then, you will want to deploy your new container. This means duplicating the ` manifests/07-operator.yaml `
193
- and updating the line ` image: docker.io/openshift/origin-console-operator:latest ` to instead use the
194
- image you just pushed.
195
-
196
- ``` bash
197
- # duplicate the operator manifest to /examples or your ~/ home dir
198
- cp manifests/07-operator.yaml ~ /07-operator-alt-image.yaml
199
- ```
200
- Then, update the image & replicas in your ` 07-operator-alt-image.yaml ` file:
190
+ Then, you will want to deploy your new container to the cluster. This can be done by updating the ` image ` field in the ` example/07-operator.yaml ` file to instead use the image you just pushed:
201
191
202
192
``` yaml
203
193
# before
204
- replicas : 2
205
194
image : docker.io/openshift/origin-console-operator:latest
206
195
# after
207
196
# image: <registry>/<your-username>/console-operator:<version>
208
- replicas : 1
209
197
image : quay.io/benjaminapetersen/console-operator:latest
210
198
` ` `
211
- And ensure that the ` imagePullPolicy` is still `Always`. This will ensure a fast development feedback loop.
212
-
213
- ` ` ` yaml
214
- imagePullPolicy: Always
215
- ` ` `
199
+ Note: To guarantee a fast development feedback loop make sure the ` imagePullPolicy` is set to `Always`.
216
200
217
201
# ### Deploying
218
202
0 commit comments