From 066add568e81ecb1b5ac37403c4cdd7dc4a23760 Mon Sep 17 00:00:00 2001 From: Anko1418 Date: Mon, 21 Oct 2024 13:36:16 +0200 Subject: [PATCH 1/4] Fetch docker image from ecr --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 495c7e1..d273e8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM public.ecr.aws/docker/library/docker:stable +ARG ACCOUNT_ID +ARG REGION + +FROM ${ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com/docker:stable COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh From c52834c4660963250c86ea28c188534ad6e65931 Mon Sep 17 00:00:00 2001 From: Anko1418 Date: Mon, 21 Oct 2024 14:43:59 +0200 Subject: [PATCH 2/4] Added support for build-args --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 948badd..aff1b9f 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,11 @@ inputs: zookeeper port: description: 'The port of Zookeeper host' required: false - default: 2181 + default: 2181 + build-args: + description: 'Additional build arguments to pass to Docker' + required: false + default: '' runs: using: 'docker' image: 'Dockerfile' From ad4d80e93da8ee915f6fd670ad41dedd10584a2b Mon Sep 17 00:00:00 2001 From: Anko1418 Date: Tue, 22 Oct 2024 09:27:29 +0200 Subject: [PATCH 3/4] Added support for docker build arguments --- action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index aff1b9f..1ce7f41 100644 --- a/action.yml +++ b/action.yml @@ -22,10 +22,17 @@ inputs: description: 'The port of Zookeeper host' required: false default: 2181 - build-args: + accountId: description: 'Additional build arguments to pass to Docker' - required: false + required: true + default: '' + region: + description: 'Additional build arguments to pass to Docker' + required: true default: '' runs: using: 'docker' image: 'Dockerfile' + args: + - ${{ inputs.accountId }} + - ${{ inputs.region }} From 61674be25e09d5efbe96e9c27198c9ac3b576db4 Mon Sep 17 00:00:00 2001 From: Anko1418 Date: Tue, 22 Oct 2024 09:31:45 +0200 Subject: [PATCH 4/4] Added support for docker build arguments --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d273e8d..2bd12e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -ARG ACCOUNT_ID -ARG REGION +ARG accountId +ARG region -FROM ${ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com/docker:stable +FROM ${accountId}.dkr.ecr.${region}.amazonaws.com/docker:stable COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh