-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jayesh Kharode <[email protected]>
- Loading branch information
Jayesh Kharode
committed
Feb 6, 2024
1 parent
01fe3e5
commit 4f6a6c7
Showing
127 changed files
with
7,262 additions
and
3,862 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM selenium/standalone-chrome:latest | ||
|
||
USER root | ||
|
||
# Define build-time arguments | ||
ARG SOURCE | ||
ARG COMMIT_HASH | ||
ARG COMMIT_ID | ||
ARG BUILD_TIME | ||
|
||
# Set labels for metadata | ||
LABEL source=${SOURCE} | ||
LABEL commit_hash=${COMMIT_HASH} | ||
LABEL commit_id=${COMMIT_ID} | ||
LABEL build_time=${BUILD_TIME} | ||
|
||
# Define build-time arguments for user and group | ||
ARG container_user=mosip | ||
ARG container_user_group=mosip | ||
ARG container_user_uid=1001 | ||
ARG container_user_gid=1001 | ||
|
||
# Set working directory for the user | ||
ENV work_dir=/home/${container_user}/ | ||
|
||
# install packages and create user | ||
RUN groupadd -g ${container_user_gid} ${container_user_group} \ | ||
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/bash -m ${container_user} -d ${work_dir} \ | ||
&& chown -R ${container_user}:${container_user} /home/${container_user}/ | ||
|
||
# Switch to the specified user for the subsequent commands | ||
USER ${container_user_uid}:${container_user_gid} | ||
|
||
# Copy files | ||
COPY --chown=${container_user_uid}:${container_user} --chmod=771 ./entrypoint.sh ${work_dir}/entrypoint.sh | ||
COPY --chown=${container_user}:${container_user} ./src/main/resources/ ${work_dir}/resources/ | ||
COPY --chown=${container_user_uid}:${container_user} ./target/*.jar ${work_dir} | ||
|
||
# Set working directory | ||
WORKDIR /home/${container_user}/ | ||
|
||
|
||
|
||
# Entrypoint for the container | ||
ENTRYPOINT ["/bin/bash", "-c", "./entrypoint.sh"] |
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,4 @@ | ||
#!/bin/bash | ||
|
||
java --version | ||
java -jar adminui-*-jar-with-dependencies.jar |
Oops, something went wrong.