Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOSIP-31575] Updated docker file. #1867

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b9bc3ca
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
52dd342
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
8f7667f
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
cce2734
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
90e7881
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
4596a22
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
19e11c0
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
22d03a6
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
70ba6a5
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
4feb714
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
ed5b34d
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
a68563c
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
39b4ce1
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
9ce0868
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
b77ed41
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
84faaaf
Update push-trigger.yml
abhishek8shankar Mar 26, 2024
972b937
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
665d993
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
6de68e7
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
7ecd481
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
411a2dd
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
db9653f
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
0e8488d
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
e80eff5
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
cf46833
[MOSIP-31575] Update Dockerfile-not-used
abhishek8shankar Mar 26, 2024
3fc1dab
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
4563904
[MOSIP-31575] Updated docker file.
abhishek8shankar Mar 26, 2024
022f1f5
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 1, 2024
bd1eeb3
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 2, 2024
6ee39b1
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 3, 2024
2864816
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 3, 2024
e4a5754
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 3, 2024
c897835
Update Dockerfile
abhishek8shankar Apr 3, 2024
6ca6bd2
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 3, 2024
53d8710
[MOSIP-31575] Updated docker file.
abhishek8shankar Apr 3, 2024
57ffbf0
Merge branch 'develop' into develop
abhishek8shankar Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

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 }}
Expand All @@ -128,4 +128,4 @@ jobs:
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,33 @@ FROM openjdk:11
#Uncomment below and Comment above line(i.e. FROM openjdk:8) for OS specific (e.g. Alpine OS ) docker base image
#FROM openjdk:8-jdk-alpine

# 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 and artifactory 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 github branch to pickup configuration from, at docker runtime
ENV spring_config_label_env=${spring_config_label}

# environment variable to pass glowroot, at docker runtime
ENV spring_config_url_env=${spring_config_url}
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

RUN apt-get -y update \
&& apt-get install -y unzip sudo \
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& adduser ${container_user} sudo

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

# change volume to whichever storage directory you want to use for this container.
Expand All @@ -68,7 +38,13 @@ VOLUME ${work_dir}/logs ${work_dir}/Glowroot
ADD ./target/registration-processor-abis-*.jar registration-processor-abis.jar

# change permissions of file inside working dir
RUN chown -R ${container_user}:${container_user} /home/${container_user}
RUN apt-get -y update \
&& apt-get install -y unzip sudo \
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& adduser ${container_user} sudo \
&& 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}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
FROM nginx

# Define arguments
ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001

# Create a user and group inside the container
RUN addgroup --gid ${container_user_gid} ${container_user_group} && \
adduser --disabled-password --gecos '' --uid ${container_user_uid} --gid ${container_user_gid} ${container_user}

# Set the working directory
WORKDIR /home/${container_user}

# Copy nginx.conf file
COPY nginx.conf /etc/nginx/nginx.conf

# Copy healthcheck.txt file
COPY healthcheck.txt /home/${container_user}/landing/healthcheck.txt

# Change ownership of /home/mosip directory
RUN chown -R ${container_user}:${container_user} /home/${container_user}

# Change user and group to the created user and group
USER ${container_user_uid}:${container_user_gid}

# Expose port 8082
EXPOSE 8082

# Run nginx
VOLUME /home/mosip

COPY nginx.conf /etc/nginx/nginx.conf
Expand All @@ -8,4 +37,5 @@ COPY healthcheck.txt /home/mosip/landing/healthcheck.txt

EXPOSE 8082


CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ 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 github branch to pickup configuration from, at docker runtime
ENV spring_config_label_env=${spring_config_label}
ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/ftp1/ARCHIVE_PACKET_LOCATION /home/ftp1/LANDING_ZONE /home/Glowroot
Expand All @@ -33,6 +35,12 @@ COPY ./target/registration-processor-packet-receiver-stage-*.jar registration-pr
EXPOSE 8081
EXPOSE 4001

WORKDIR /home/${container_user}

RUN chown -R ${container_user}:${container_user} /home/${container_user}

USER ${container_user_uid}:${container_user_gid}

CMD if [ "$active_profile_env" = "preprod" ]; then \
wget 'http://13.71.87.138:8040/artifactory/libs-release-local/io/mosip/testing/glowroot.zip' ; \
apt-get update && apt-get install -y unzip ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,31 @@ FROM openjdk:11
#Uncomment below and Comment above line(i.e. FROM openjdk:8) for OS specific (e.g. Alpine OS ) docker base image
#FROM openjdk:8-jdk-alpine

# 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
# can be passed during Docker build as build time environment for github branch to pickup configuration from | spring profiles active and config server URL, respectively.
ARG spring_config_label
ARG active_profile
ARG spring_config_url

# can be passed during Docker build as build time environment management rmi server hostname
ARG management_rmi_server_hostname

# can be passed during Docker build as build time environment management rmi server port
ARG management_jmxremote_rmi_port

# 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 | iam_adapter url, at docker runtime | management rmi server hostname and management rmi server port, respectively
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 github branch to pickup configuration from, at docker runtime
ENV spring_config_label_env=${spring_config_label}

# 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

RUN apt-get -y update \
&& apt-get install -y unzip sudo \
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& adduser ${container_user} sudo

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

# change volume to whichever storage directory you want to use for this container.
Expand All @@ -67,7 +39,13 @@ EXPOSE 8083
EXPOSE 4000

# change permissions of file inside working dir
RUN chown -R ${container_user}:${container_user} /home/${container_user}
RUN apt-get -y update \
&& apt-get install -y unzip sudo \
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& adduser ${container_user} sudo \
&& 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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,27 @@ 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

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/logs

COPY ./target/registration-processor-credential-requestor-stage-*.jar registration-processor-credential-requestor-stage.jar

WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

CMD if [ "$is_glowroot_env" = "present" ]; then \
wget "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/testing/glowroot.zip ; \
apt-get update && apt-get install -y unzip ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ 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
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001

WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ ENV is_glowroot_env=${is_glowroot}
# environment variable to pass artifactory url, at docker runtime
ENV artifactory_url_env=${artifactory_url}

ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001
WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/logs /home/ftp1/LANDING_ZONE /home/ftp1/ARCHIVE_PACKET_LOCATION

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ ENV is_glowroot_env=${is_glowroot}
# environment variable to pass artifactory url, at docker runtime
ENV artifactory_url_env=${artifactory_url}

ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001
WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ ENV is_glowroot_env=${is_glowroot}
# environment variable to pass artifactory url, at docker runtime
ENV artifactory_url_env=${artifactory_url}

ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001
WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

# change volume to whichever storage directory you want to use for this container.
VOLUME /home/logs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ ENV is_glowroot_env=${is_glowroot}
# environment variable to pass artifactory url, at docker runtime
ENV artifactory_url_env=${artifactory_url}

ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001
WORKDIR /home/${container_user}
RUN chown -R ${container_user}:${container_user} /home/${container_user}
USER ${container_user_uid}:${container_user_gid}

COPY ./target/registration-processor-securezone-notification-stage-*.jar registration-processor-securezone-notification-stage.jar


Expand Down
Loading
Loading