-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INJICERT-212] Docker file for inji certify repo and integration of c…
…ertify with eSignet + sunbird C installation Signed-off-by: Challarao <[email protected]>
- Loading branch information
1 parent
12aa009
commit 8f3ea05
Showing
17 changed files
with
1,721 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
FROM openjdk:21 | ||
|
||
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 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 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 | ||
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} | ||
|
||
# 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 file sudo \ | ||
&& groupadd -g ${container_user_gid} ${container_user_group} \ | ||
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \ | ||
&& id -u ${container_user} &>/dev/null || adduser ${container_user} | ||
|
||
RUN id -u ${container_user} | ||
# set working directory for the user | ||
WORKDIR /home/${container_user} | ||
|
||
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/certify-service-*.jar certify-service.jar | ||
|
||
# change permissions of file inside working dir | ||
RUN chown -R ${container_user}:${container_user} /home/${container_user} | ||
|
||
# select container user for all tasks | ||
USER ${container_user_uid}:${container_user_gid} | ||
|
||
EXPOSE 8090 | ||
EXPOSE 9010 | ||
|
||
#ENTRYPOINT [ "./configure_start.sh" ] | ||
CMD if [ "$is_glowroot_env" = "present" ]; then \ | ||
wget -q --show-progress "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/testing/glowroot.zip ; \ | ||
unzip glowroot.zip ; \ | ||
rm -rf glowroot.zip ; \ | ||
sed -i 's/<service_name>/idp-service/g' glowroot/glowroot.properties ; \ | ||
java -jar -javaagent:glowroot/glowroot.jar -Dloader.path="${loader_path_env}" -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" certify-service.jar ; \ | ||
else \ | ||
java -jar -Dloader.path="${loader_path_env}" -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" certify-service.jar ; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
cd docker-compose-esignet | ||
cd docker-compose-certify | ||
docker compose down | ||
sudo rm -rf data | ||
cd .. | ||
|
File renamed without changes.
Oops, something went wrong.