Skip to content

Commit

Permalink
[MOSIP-31575] Updated docker file.
Browse files Browse the repository at this point in the history
Signed-off-by: abhishek8shankar <[email protected]>
  • Loading branch information
abhishek8shankar committed Apr 12, 2024
1 parent acab41c commit 9b37502
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 66 deletions.
75 changes: 52 additions & 23 deletions authentication/authentication-internal-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,57 +1,86 @@
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| spring profiles active | config server URL | biosdk zip path | demosdk zip path | hsm client zip file path | glowroot and artifactory URL respectively .
# 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
ARG active_profile

# can be passed during Docker build as build time environment for config server URL
ARG spring_config_url

#ARG bio_sdk_folder=mock/0.9
ARG biosdk_zip_path

ARG demosdk_zip_path

# can be passed during Docker build as build time environment for hsm client zip file path
#ARG client_zip_path
ARG hsm_client_zip_path

# 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 | iam_adapter url, at docker runtime | biosdk client zip file path, at docker runtime | demosdk client zip file path, at docker runtime snd hsm client zip file path, at docker runtime
ARG biosdk_local_dir=biosdk-client

ARG demosdk_local_dir=demosdk

ARG hsm_local_dir=hsm-client

# 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}

#ENV bio_sdk_folder_env=${bio_sdk_folder}
ENV biosdk_zip_file_path=${biosdk_zip_path}

ENV demosdk_zip_file_path=${demosdk_zip_path}

# environment variable to pass hsm client zip file path, at docker runtime
#ENV zip_file_path=${client_zip_path}
ENV hsm_zip_file_path=${hsm_client_zip_path}

# 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

ARG hsm_local_dir=hsm-client

ENV hsm_local_dir_name=${hsm_local_dir}

ARG biosdk_local_dir=biosdk-client

ARG demosdk_local_dir=demosdk

ENV biosdk_local_dir_name=${biosdk_local_dir}

ENV demosdk_local_dir_name=${demosdk_local_dir}

# 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}

Expand Down
60 changes: 41 additions & 19 deletions authentication/authentication-otp-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,70 @@
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| spring profiles active | config server URL | hsm client zip file path | glowroot and artifactory URL respectively .
# 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
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 hsm client zip file path
#ARG client_zip_path
ARG hsm_client_zip_path
ARG hsm_client_zip_path

# 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}

# environment variable to pass hsm client zip file path, at docker runtime
#ENV zip_file_path=${client_zip_path}
ENV hsm_zip_file_path=${hsm_client_zip_path}

#ENV work_dir_env=/
# 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}

# 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
#ENV work_dir_env=/

ARG hsm_local_dir=hsm-client

ENV hsm_local_dir_name=${hsm_local_dir}


# set working directory for the user
WORKDIR /home/${container_user}

Expand Down
82 changes: 58 additions & 24 deletions authentication/authentication-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,89 @@
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| spring profiles active | config server URL | hsm client zip file path | glowroot and artifactory URL respectively .
# 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
ARG active_profile

# can be passed during Docker build as build time environment for config server URL
ARG spring_config_url

#ARG bio_sdk_folder=mock/0.9
ARG biosdk_zip_path

ARG demosdk_zip_path

# can be passed during Docker build as build time environment for hsm client zip file path
#ARG client_zip_path
ARG hsm_client_zip_path
ARG hsm_client_zip_path

# 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

ARG hsm_local_dir=hsm-client

ARG biosdk_local_dir=biosdk-client

ARG demosdk_local_dir=demosdk

# 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}

#ENV bio_sdk_folder_env=${bio_sdk_folder}
ENV biosdk_zip_file_path=${biosdk_zip_path}

#ENV demo_sdk_folder_env=${demo_sdk_folder}
ENV demosdk_zip_file_path=${demosdk_zip_path}

# environment variable to pass hsm client zip file path, at docker runtime
#ENV zip_file_path=${client_zip_path}
ENV hsm_zip_file_path=${hsm_client_zip_path}

#ENV work_dir_env=/

# 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

ARG hsm_local_dir=hsm-client

ENV hsm_local_dir_name=${hsm_local_dir}

ARG biosdk_local_dir=biosdk-client

ARG demosdk_local_dir=demosdk

ENV biosdk_local_dir_name=${biosdk_local_dir}

ENV demosdk_local_dir_name=${demosdk_local_dir}

# 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}

Expand Down

0 comments on commit 9b37502

Please sign in to comment.