From db0b564ecf9e698f4c2aa764e95ebe829e22fe40 Mon Sep 17 00:00:00 2001 From: Jordan Dubrick Date: Fri, 19 Apr 2024 15:41:04 -0400 Subject: [PATCH] Spike/complete podman support (#235) * add podman aliasing to oci-registry scripts Signed-off-by: Jordan Dubrick * update oci-registry docs for clarity Signed-off-by: Jordan Dubrick * update scripts to run from root dir as well Signed-off-by: Jordan Dubrick --------- Signed-off-by: Jordan Dubrick --- oci-registry/README.md | 5 ++++- oci-registry/build.sh | 4 ++++ oci-registry/push.sh | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/oci-registry/README.md b/oci-registry/README.md index e8faccf2b..064b99cdc 100644 --- a/oci-registry/README.md +++ b/oci-registry/README.md @@ -3,8 +3,11 @@ This folder contains the Dockerfile for the OCI registry server. It is based off of the [reference implementation from Docker](https://github.com/docker/distribution), but using a UBI-8 base image rather than Alpine. ## Build +The scripts in this project support both `Docker` and `Podman` container engines. By default the scripts will run using `Docker`, to use `Podman` first run `export USE_PODMAN=true`. -To build the image, run `build.sh`. +To build the image, run `bash build.sh`. + +To push the image to a repository of your choice, you can run `bash push.sh `. ## Deploy diff --git a/oci-registry/build.sh b/oci-registry/build.sh index e61097344..d5759b1fa 100755 --- a/oci-registry/build.sh +++ b/oci-registry/build.sh @@ -17,4 +17,8 @@ # Build the index container for the registry buildfolder="$(basename "$(dirname "$0")")" + +# set podman alias if necessary +. ${buildfolder}/../setenv.sh + docker build -t oci-registry:next $buildfolder diff --git a/oci-registry/push.sh b/oci-registry/push.sh index f72dc0938..ff2d31702 100755 --- a/oci-registry/push.sh +++ b/oci-registry/push.sh @@ -15,6 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# set podman alias if necessary +. $(basename "$(dirname "$0")")/../setenv.sh + IMAGE_TAG=$1 docker tag oci-registry:next $IMAGE_TAG docker push $IMAGE_TAG