Skip to content

Commit 6b3db41

Browse files
authored
Implement Podman scripts for Registry-Operator Makefile (#61)
* update documentation for podman support Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * update Makefile to add podman commands Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * update readme wording for engine being used Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> --------- Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
1 parent b4ddb0d commit 6b3db41

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ You can tag Devfile Registry related issues with the `/area registry` text in yo
2424
3. Open the folder in the IDE of your choice (VS Code with Go extension, or GoLand is recommended)
2525

2626
#### Build and Run the Operator
27+
The Makefile currently supports both Docker and Podman. To run the proper command replace `<engine>` with either `podman` or `docker` depending on your container engine.
2728
1. Log in to an OpenShift or Kubernetes cluster
2829

2930
2. Run `export IMG=<operator-image>` where `<operator-image>` is the image repository to where you would like to push the image (e.g. `quay.io/user/registry-operator:latest`).
3031

31-
3. Run `make docker-build` to build the devfile registry operator.
32+
3. Run `make <engine>-build` to build the devfile registry operator.
3233

33-
4. Run `make docker-push` to push the devfile registry operator image.
34+
4. Run `make <engine>-push` to push the devfile registry operator image.
3435

35-
5. (Optional, **docker only**) Run `make docker-buildx` to build and push the devfile registry operator multi-architecture image
36+
5. (Optional, **docker only**) Run `make docker-buildx` to build and push the devfile registry operator multi-architecture image.
3637

37-
6. Run `make install-cert` to install the cert-manager.
38+
6. Run `make install-cert` to install the cert-manager. (Allow time for these services to spin up before moving on to step 7 & 8).
3839

3940
7. Run `make install` to install the CRDs.
4041

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ docker-buildx: test ## Build and push docker image for the manager for cross-pla
195195
- docker buildx rm registry-operator-builder
196196
rm Dockerfile.cross
197197

198+
# Build the podman image
199+
.PHONY: podman-build
200+
podman-build:
201+
podman build . -t ${IMG} --build-arg ENABLE_WEBHOOKS=${ENABLE_WEBHOOKS}
202+
203+
# Push the podman image
204+
.PHONY: podman-push
205+
podman-push:
206+
podman push ${IMG}
207+
208+
198209
.PHONY: install-cert
199210
install-cert: ## Install cert manager for webhooks
200211
$(K8S_CLI) apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ Some of the rules supported by the makefile:
7171
|---|---|
7272
| controller-gen | install the controller-gen tool, used by other commands |
7373
| kustomize | install the kustomize tool, used by other commands |
74-
| docker-build | build registry operator docker image |
75-
| docker-push | push registry operator docker image |
76-
| docker-buildx | build & push registry operator docker image for all supported architectures \(**does not work with podman**\) |
74+
| docker-build | build registry operator container image using docker |
75+
| docker-push | push registry operator container image using docker |
76+
| docker-buildx | build & push registry operator docker image for all supported architectures |
77+
| podman-build | build registry operator container image using podman |
78+
| podman-push | push registry operator container image using podman |
7779
| deploy | deploy operator to cluster |
7880
| undeploy | undeploy operator from cluster |
7981
| install | create the devfile registry CRDs on the cluster |
@@ -101,7 +103,7 @@ define the environment variable `K8S_CLI` with the command you prefer to use.
101103

102104
By default, the tests will use the default image for the operator, `quay.io/devfile/registry-operator:next`.
103105

104-
You can use `make docker-build` to build your own image, `make docker-push` to publish it. Then, to use your own image, run:
106+
You can use `make <engine>-build` to build your own image, `make <engine>-push` to publish it - Replace `<engine>` with `podman` or `docker`. Then, to use your own image, run:
105107

106108
```
107109
IMG=<your-operator-image> make test-integration

0 commit comments

Comments
 (0)