From 65243dd17cc9e2ca5ee1d970187e650e5555f2ca Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:22:18 +0530 Subject: [PATCH 1/7] [MOSIP-31575] Updated docker file. Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .../Dockerfile | 49 +++++-------------- 1 file changed, 11 insertions(+), 38 deletions(-) diff --git a/pre-registration/pre-registration-application-service/Dockerfile b/pre-registration/pre-registration-application-service/Dockerfile index 31582a7e7e0..9871d7060c8 100644 --- a/pre-registration/pre-registration-application-service/Dockerfile +++ b/pre-registration/pre-registration-application-service/Dockerfile @@ -9,57 +9,27 @@ LABEL commit_hash=${COMMIT_HASH} LABEL commit_id=${COMMIT_ID} LABEL build_time=${BUILD_TIME} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG spring_config_label - -# can be passed during Docker build as build time environment for spring profiles active +# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . +ARG spring_config_label ARG active_profile - -# can be passed during Docker build as build time environment for config server URL -ARG spring_config_url - -# can be passed during Docker build as build time environment for glowroot +ARG spring_config_url ARG is_glowroot - -# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime +# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. ENV active_profile_env=${active_profile} - -# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} - -# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} - -# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} - -# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} - -# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_group=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_uid=1001 - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_gid=1001 -# install packages and create user -RUN apt-get -y update \ -&& apt-get install -y unzip \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} - # set working directory for the user WORKDIR /home/${container_user} @@ -67,14 +37,17 @@ ENV work_dir=/home/${container_user} ARG loader_path=${work_dir}/additional_jars/ -RUN mkdir -p ${loader_path} - ENV loader_path_env=${loader_path} COPY ./target/pre-registration-application-*.jar pre-registration-application-service.jar -# change permissions of file inside working dir -RUN chown -R ${container_user}:${container_user} /home/${container_user} +#i nstall packages, create user and change permissions of file inside working dir +RUN apt-get -y update \ +&& apt-get install -y unzip \ +&& groupadd -g ${container_user_gid} ${container_user_group} \ +&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ +&& mkdir -p ${loader_path} \ +&& chown -R ${container_user}:${container_user} /home/${container_user} # select container user for all tasks USER ${container_user_uid}:${container_user_gid} From 2a1bc1e69e8dd51b5774e062302f42d7fa09f12a Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:25:55 +0530 Subject: [PATCH 2/7] [MOSIP-31575] Updated docker file. Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .../pre-registration-batchjob/Dockerfile | 47 +++++-------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/pre-registration/pre-registration-batchjob/Dockerfile b/pre-registration/pre-registration-batchjob/Dockerfile index 88fa59efc3c..ef60a73a251 100644 --- a/pre-registration/pre-registration-batchjob/Dockerfile +++ b/pre-registration/pre-registration-batchjob/Dockerfile @@ -12,54 +12,27 @@ LABEL build_time=${BUILD_TIME} # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG spring_config_label -# can be passed during Docker build as build time environment for spring profiles active +# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . +ARG spring_config_label ARG active_profile - -# can be passed during Docker build as build time environment for config server URL -ARG spring_config_url - -# can be passed during Docker build as build time environment for glowroot +ARG spring_config_url ARG is_glowroot - -# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime +# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. ENV active_profile_env=${active_profile} - -# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} - -# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} - -# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} - -# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} - -# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_group=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_uid=1001 - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_gid=1001 -# install packages and create user -RUN apt-get -y update \ -&& apt-get install -y unzip \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} - # set working directory for the user WORKDIR /home/${container_user} @@ -67,14 +40,18 @@ ENV work_dir=/home/${container_user} ARG loader_path=${work_dir}/additional_jars -RUN mkdir -p ${loader_path} - ENV loader_path_env=${loader_path} COPY ./target/pre-registration-batchjob-*.jar pre-registration-batchjob.jar -# change permissions of file inside working dir -RUN chown -R ${container_user}:${container_user} /home/${container_user} +## install packages, create user and change permissions of file inside working dir + +RUN apt-get -y update \ +&& apt-get install -y unzip \ +&& groupadd -g ${container_user_gid} ${container_user_group} \ +&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ +&& mkdir -p ${loader_path} \ +&& chown -R ${container_user}:${container_user} /home/${container_user} # select container user for all tasks USER ${container_user_uid}:${container_user_gid} From b5ed1cd23622993156df7d4d6b72b1cc3c4993b8 Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:30:50 +0530 Subject: [PATCH 3/7] [MOSIP-31575] Updated docker file. Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .../Dockerfile | 48 +++++-------------- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/pre-registration/pre-registration-captcha-service/Dockerfile b/pre-registration/pre-registration-captcha-service/Dockerfile index a3eaa7517d0..b564d6bda62 100644 --- a/pre-registration/pre-registration-captcha-service/Dockerfile +++ b/pre-registration/pre-registration-captcha-service/Dockerfile @@ -9,54 +9,27 @@ LABEL commit_hash=${COMMIT_HASH} LABEL commit_id=${COMMIT_ID} LABEL build_time=${BUILD_TIME} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG spring_config_label - -# can be passed during Docker build as build time environment for spring profiles active +# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . +ARG spring_config_label ARG active_profile - -# can be passed during Docker build as build time environment for config server URL -ARG spring_config_url - -# can be passed during Docker build as build time environment for glowroot +ARG spring_config_url ARG is_glowroot - -# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime +# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. ENV active_profile_env=${active_profile} - -# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} - -# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} - -# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} - -# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} +ENV iam_adapter_url_env=${iam_adapter_url} # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_group=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_uid=1001 - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_gid=1001 -# install packages and create user -RUN apt-get -y update \ -&& apt-get install -y unzip \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} - # set working directory for the user WORKDIR /home/${container_user} @@ -64,16 +37,19 @@ ENV work_dir=/home/${container_user} ARG loader_path=${work_dir}/additional_jars/ -RUN mkdir -p ${loader_path} - ENV loader_path_env=${loader_path} COPY ./target/pre-registration-captcha-service-*.jar pre-registration-captcha-service.jar #ADD http://13.71.87.138:8040/artifactory/libs-release-local/io/mosip/kernel/kernel-ref-idobjectvalidator/0.9.1/kernel-ref-idobjectvalidator-0.9.1.jar kernel-ref-idobjectvalidator-0.9.1.jar -# change permissions of file inside working dir -RUN chown -R ${container_user}:${container_user} /home/${container_user} +# install packages, create user change permissions of file inside working dir +RUN apt-get -y update \ +&& apt-get install -y unzip \ +&& groupadd -g ${container_user_gid} ${container_user_group} \ +&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ +&& mkdir -p ${loader_path} \ +&& chown -R ${container_user}:${container_user} /home/${container_user} # select container user for all tasks USER ${container_user_uid}:${container_user_gid} From 4f3422711b67d4c0a95bc0ae5d355c23b4719796 Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:33:54 +0530 Subject: [PATCH 4/7] [MOSIP-31575] Updated docker file. Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .../Dockerfile | 49 +++++-------------- 1 file changed, 11 insertions(+), 38 deletions(-) diff --git a/pre-registration/pre-registration-datasync-service/Dockerfile b/pre-registration/pre-registration-datasync-service/Dockerfile index 5ef3d1d948d..abf121ec84e 100644 --- a/pre-registration/pre-registration-datasync-service/Dockerfile +++ b/pre-registration/pre-registration-datasync-service/Dockerfile @@ -9,57 +9,27 @@ LABEL commit_hash=${COMMIT_HASH} LABEL commit_id=${COMMIT_ID} LABEL build_time=${BUILD_TIME} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG spring_config_label - -# can be passed during Docker build as build time environment for spring profiles active +# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . +ARG spring_config_label ARG active_profile - -# can be passed during Docker build as build time environment for config server URL -ARG spring_config_url - -# can be passed during Docker build as build time environment for glowroot +ARG spring_config_url ARG is_glowroot - -# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime +# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. ENV active_profile_env=${active_profile} - -# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} - -# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} - -# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} - -# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} - -# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_group=mosip - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_uid=1001 - -# can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user_gid=1001 -# install packages and create user -RUN apt-get -y update \ -&& apt-get install -y unzip \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} - # set working directory for the user WORKDIR /home/${container_user} @@ -67,14 +37,17 @@ ENV work_dir=/home/${container_user} ARG loader_path=${work_dir}/additional_jars/ -RUN mkdir -p ${loader_path} - ENV loader_path_env=${loader_path} COPY ./target/pre-registration-datasync-service-*.jar pre-registration-datasync-service.jar -# change permissions of file inside working dir -RUN chown -R ${container_user}:${container_user} /home/${container_user} +# install packages, create user and change permissions of file inside working dir +RUN apt-get -y update \ +&& apt-get install -y unzip \ +&& groupadd -g ${container_user_gid} ${container_user_group} \ +&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ +&& mkdir -p ${loader_path} \ +&& chown -R ${container_user}:${container_user} /home/${container_user} # select container user for all tasks USER ${container_user_uid}:${container_user_gid} From 9493669791e8c6d6fa225adb167465b7f9ec09ee Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:37:07 +0530 Subject: [PATCH 5/7] Update push-trigger.yml Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 817a5ff40f0..8d41e83b1f7 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -67,7 +67,7 @@ jobs: BUILD_ARTIFACT: 'pre-registration' fail-fast: false name: ${{ matrix.SERVICE_NAME }} - uses: mosip/kattu/.github/workflows/docker-build.yml@master + uses: abhishek8shankar/kattu/.github/workflows/docker-build.yml@develop with: SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} SERVICE_NAME: ${{ matrix.SERVICE_NAME }} From a6c77e15dcd3c2d886783a38dd519f6316c1bb38 Mon Sep 17 00:00:00 2001 From: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:57:51 +0530 Subject: [PATCH 6/7] Update push-trigger.yml Signed-off-by: abhishek8shankar <127825992+abhishek8shankar@users.noreply.github.com> --- .github/workflows/push-trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index 8d41e83b1f7..817a5ff40f0 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -67,7 +67,7 @@ jobs: BUILD_ARTIFACT: 'pre-registration' fail-fast: false name: ${{ matrix.SERVICE_NAME }} - uses: abhishek8shankar/kattu/.github/workflows/docker-build.yml@develop + uses: mosip/kattu/.github/workflows/docker-build.yml@master with: SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} SERVICE_NAME: ${{ matrix.SERVICE_NAME }} From cc6c936c9165a37948d241e753969822001a6758 Mon Sep 17 00:00:00 2001 From: abhishek8shankar Date: Fri, 12 Apr 2024 20:40:42 +0530 Subject: [PATCH 7/7] [MOSIP-31575] Updated docker file. Signed-off-by: abhishek8shankar --- .../Dockerfile | 55 +++++++++++++------ .../pre-registration-batchjob/Dockerfile | 54 ++++++++++++------ .../Dockerfile | 54 ++++++++++++------ .../Dockerfile | 55 +++++++++++++------ 4 files changed, 148 insertions(+), 70 deletions(-) diff --git a/pre-registration/pre-registration-application-service/Dockerfile b/pre-registration/pre-registration-application-service/Dockerfile index 9871d7060c8..2d96bb7d2cc 100644 --- a/pre-registration/pre-registration-application-service/Dockerfile +++ b/pre-registration/pre-registration-application-service/Dockerfile @@ -1,34 +1,55 @@ FROM openjdk:11 -ARG SOURCE -ARG COMMIT_HASH -ARG COMMIT_ID -ARG BUILD_TIME -LABEL source=${SOURCE} -LABEL commit_hash=${COMMIT_HASH} -LABEL commit_id=${COMMIT_ID} -LABEL build_time=${BUILD_TIME} +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG spring_config_label -# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . -ARG spring_config_label +# can be passed during Docker build as build time environment for spring profiles active ARG active_profile -ARG spring_config_url + +# can be passed during Docker build as build time environment for config server URL +ARG spring_config_url + +# can be passed during Docker build as build time environment for glowroot ARG is_glowroot + +# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG container_user=mosip +ARG container_user_group=mosip +ARG container_user_uid=1001 +ARG container_user_gid=1001 + +# can be passed during Docker build as build time environment for label related addition to docker. +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME + +# environment variable to pass active profile such as DEV, QA etc at docker runtime ENV active_profile_env=${active_profile} + +# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} + +# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} + +# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} + +# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} + +# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user=mosip -ARG container_user_group=mosip -ARG container_user_uid=1001 -ARG container_user_gid=1001 +# can be passed during Docker build as build time environment for label. +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} # set working directory for the user WORKDIR /home/${container_user} diff --git a/pre-registration/pre-registration-batchjob/Dockerfile b/pre-registration/pre-registration-batchjob/Dockerfile index ef60a73a251..a037807f27e 100644 --- a/pre-registration/pre-registration-batchjob/Dockerfile +++ b/pre-registration/pre-registration-batchjob/Dockerfile @@ -1,37 +1,55 @@ FROM openjdk:11 -ARG SOURCE -ARG COMMIT_HASH -ARG COMMIT_ID -ARG BUILD_TIME -LABEL source=${SOURCE} -LABEL commit_hash=${COMMIT_HASH} -LABEL commit_id=${COMMIT_ID} -LABEL build_time=${BUILD_TIME} - # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG spring_config_label -# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . -ARG spring_config_label +# can be passed during Docker build as build time environment for spring profiles active ARG active_profile -ARG spring_config_url + +# can be passed during Docker build as build time environment for config server URL +ARG spring_config_url + +# can be passed during Docker build as build time environment for glowroot ARG is_glowroot + +# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG container_user=mosip +ARG container_user_group=mosip +ARG container_user_uid=1001 +ARG container_user_gid=1001 + +# can be passed during Docker build as build time environment for label related addition to docker. +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME + +# environment variable to pass active profile such as DEV, QA etc at docker runtime ENV active_profile_env=${active_profile} + +# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} + +# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} + +# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} + +# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} + +# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user=mosip -ARG container_user_group=mosip -ARG container_user_uid=1001 -ARG container_user_gid=1001 +# can be passed during Docker build as build time environment for label. +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} # set working directory for the user WORKDIR /home/${container_user} diff --git a/pre-registration/pre-registration-captcha-service/Dockerfile b/pre-registration/pre-registration-captcha-service/Dockerfile index b564d6bda62..87a7d652b8a 100644 --- a/pre-registration/pre-registration-captcha-service/Dockerfile +++ b/pre-registration/pre-registration-captcha-service/Dockerfile @@ -1,34 +1,52 @@ FROM openjdk:11 -ARG SOURCE -ARG COMMIT_HASH -ARG COMMIT_ID -ARG BUILD_TIME -LABEL source=${SOURCE} -LABEL commit_hash=${COMMIT_HASH} -LABEL commit_id=${COMMIT_ID} -LABEL build_time=${BUILD_TIME} +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG spring_config_label -# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . -ARG spring_config_label +# can be passed during Docker build as build time environment for spring profiles active ARG active_profile -ARG spring_config_url + +# can be passed during Docker build as build time environment for config server URL +ARG spring_config_url + +# can be passed during Docker build as build time environment for glowroot ARG is_glowroot + +# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG container_user=mosip +ARG container_user_group=mosip +ARG container_user_uid=1001 +ARG container_user_gid=1001 + +# can be passed during Docker build as build time environment for label related addition to docker. +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME + +# environment variable to pass active profile such as DEV, QA etc at docker runtime ENV active_profile_env=${active_profile} + +# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} + +# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} + +# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} + +# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} -ENV iam_adapter_url_env=${iam_adapter_url} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user=mosip -ARG container_user_group=mosip -ARG container_user_uid=1001 -ARG container_user_gid=1001 +# can be passed during Docker build as build time environment for label. +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} # set working directory for the user WORKDIR /home/${container_user} diff --git a/pre-registration/pre-registration-datasync-service/Dockerfile b/pre-registration/pre-registration-datasync-service/Dockerfile index abf121ec84e..2a0ffe3996d 100644 --- a/pre-registration/pre-registration-datasync-service/Dockerfile +++ b/pre-registration/pre-registration-datasync-service/Dockerfile @@ -1,34 +1,55 @@ FROM openjdk:11 -ARG SOURCE -ARG COMMIT_HASH -ARG COMMIT_ID -ARG BUILD_TIME -LABEL source=${SOURCE} -LABEL commit_hash=${COMMIT_HASH} -LABEL commit_id=${COMMIT_ID} -LABEL build_time=${BUILD_TIME} +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG spring_config_label -# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active | config server URL | glowroot and artifactory URL respectively . -ARG spring_config_label +# can be passed during Docker build as build time environment for spring profiles active ARG active_profile -ARG spring_config_url + +# can be passed during Docker build as build time environment for config server URL +ARG spring_config_url + +# can be passed during Docker build as build time environment for glowroot ARG is_glowroot + +# can be passed during Docker build as build time environment for artifactory URL ARG artifactory_url -# environment variable to pass active profile such as DEV, QA etc at docker runtime | github branch to pickup configuration from, at docker runtime | spring configuration url, at docker runtime | glowroot, at docker runtime | artifactory url, at docker runtime and iam_adapter url, at docker runtime. +# can be passed during Docker build as build time environment for github branch to pickup configuration from. +ARG container_user=mosip +ARG container_user_group=mosip +ARG container_user_uid=1001 +ARG container_user_gid=1001 + +# can be passed during Docker build as build time environment for label related addition to docker. +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME + +# environment variable to pass active profile such as DEV, QA etc at docker runtime ENV active_profile_env=${active_profile} + +# environment variable to pass github branch to pickup configuration from, at docker runtime ENV spring_config_label_env=${spring_config_label} + +# environment variable to pass spring configuration url, at docker runtime ENV spring_config_url_env=${spring_config_url} + +# environment variable to pass glowroot, at docker runtime ENV is_glowroot_env=${is_glowroot} + +# environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} + +# environment variable to pass iam_adapter url, at docker runtime ENV iam_adapter_url_env=${iam_adapter_url} -# can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user=mosip -ARG container_user_group=mosip -ARG container_user_uid=1001 -ARG container_user_gid=1001 +# can be passed during Docker build as build time environment for label. +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} # set working directory for the user WORKDIR /home/${container_user}