From c7e115316b2a59c6e51cd248b62c53349e548836 Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Wed, 18 Oct 2023 11:39:12 +0530 Subject: [PATCH] using same dockerfile for both apple silicon/other --- deps/keycloak/Dockerfile | 3 ++- deps/keycloak/Dockerfile.mac | 6 ------ deps/keycloak/Makefile | 22 +++++++++++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 deps/keycloak/Dockerfile.mac diff --git a/deps/keycloak/Dockerfile b/deps/keycloak/Dockerfile index a0e91a3d4..6d2de53fc 100644 --- a/deps/keycloak/Dockerfile +++ b/deps/keycloak/Dockerfile @@ -1,4 +1,5 @@ -FROM sunbirdrc/keycloak +ARG KEYCLOAK_BASE_IMAGE=sunbirdrc/keycloak +FROM $KEYCLOAK_BASE_IMAGE ADD themes /opt/jboss/keycloak/themes ADD providers /opt/jboss/keycloak/providers diff --git a/deps/keycloak/Dockerfile.mac b/deps/keycloak/Dockerfile.mac deleted file mode 100644 index d39ef8301..000000000 --- a/deps/keycloak/Dockerfile.mac +++ /dev/null @@ -1,6 +0,0 @@ -FROM ghcr.io/sunbird-rc/keycloak-silicon - -ADD themes /opt/jboss/keycloak/themes -ADD providers /opt/jboss/keycloak/providers - -ENTRYPOINT ["/opt/jboss/tools/docker-entrypoint.sh"] diff --git a/deps/keycloak/Makefile b/deps/keycloak/Makefile index 6e0a5c96f..09995894b 100644 --- a/deps/keycloak/Makefile +++ b/deps/keycloak/Makefile @@ -1,13 +1,21 @@ -build-mac-base: - @docker build -t ghcr.io/sunbird-rc/keycloak-silicon -f apple-silicon/Dockerfile apple-silicon +IMAGE_DESTINATION=ghcr.io/sunbird-rc -build: build-mac-base +build: echo "Building docker image" @cd ../keycloak-mobile-number-login-spi/ && sh ./build.sh - @docker build -t ghcr.io/sunbird-rc/sunbird-rc-keycloak -f Dockerfile . - @docker build -t ghcr.io/sunbird-rc/sunbird-rc-keycloak:silicon -f Dockerfile.mac . + @docker build -t $(IMAGE_DESTINATION)/sunbird-rc-keycloak . push: - @docker push ghcr.io/sunbird-rc/sunbird-rc-keycloak - @docker push ghcr.io/sunbird-rc/sunbird-rc-keycloak:silicon + @docker push $(IMAGE_DESTINATION)/sunbird-rc-keycloak + +build-silicon-base: + @docker build -t $(IMAGE_DESTINATION)/keycloak-silicon -f apple-silicon/Dockerfile apple-silicon + +build-silicon: + echo "Building docker image" + @cd ../keycloak-mobile-number-login-spi/ && sh ./build.sh + @docker build -t $(IMAGE_DESTINATION)/sunbird-rc-keycloak:silicon --build-arg KEYCLOAK_BASE_IMAGE=vikastc/sunbirdrc-keycloak:apple-silicon . + +push-silicon: + @docker push $(IMAGE_DESTINATION)/sunbird-rc-keycloak:silicon \ No newline at end of file