Skip to content

Commit

Permalink
MOSIP-38929 Dockerization for pmp ui revamp (#1087)
Browse files Browse the repository at this point in the history
* MOSIP-34116

Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in>

* resolve conflicts

Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in>

* Update Kernel.properties

Signed-off-by: anup-nehe <117707464+anup-nehe@users.noreply.github.com>

* MOSIP-38929

Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in>

---------

Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in>
Signed-off-by: anup-nehe <117707464+anup-nehe@users.noreply.github.com>
  • Loading branch information
anup-nehe authored Jan 13, 2025
1 parent 54ba88c commit 7c8d063
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
32 changes: 17 additions & 15 deletions uitest-pmprevamp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
FROM selenium/standalone-chrome:latest
# Start with a base image that includes Java 21
FROM openjdk:21-slim

# Install additional dependencies, such as Selenium, Chrome, and kubectl
USER root

# Define build-time arguments
RUN apt-get update && \
apt-get install -y wget curl unzip xvfb libxi6 libgconf-2-4 chromium chromium-driver

# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/kubectl

# Define build-time arguments and labels
ARG SOURCE
ARG COMMIT_HASH
ARG COMMIT_ID
Expand All @@ -23,29 +33,21 @@ ARG container_user_gid=1001
# Set working directory for the user
ENV work_dir=/home/${container_user}/

ARG KUBECTL_VERSION=1.22.9

# install packages and create user
# Create a new user with specified permissions
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}/ \
&& curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \
&& chmod +x kubectl \
&& mv kubectl /usr/local/bin/
&& 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 your application files into the container
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
# Set the working directory
WORKDIR /home/${container_user}/




# Entrypoint for the container
ENTRYPOINT ["/bin/bash", "-c", "./entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "-c", "./entrypoint.sh"]
21 changes: 21 additions & 0 deletions uitest-pmprevamp/src/main/resources/pmp_revamp_cert/FTM_ca.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDgTCCAmmgAwIBAgIUV0rkWj1Wywi3RCpn+JfBaG5OUu0wDQYJKoZIhvcNAQEL
BQAwYTELMAkGA1UEBhMCSU4xEjAQBgNVBAgMCUthcmFudGFrYTESMBAGA1UEBwwJ
QmFuZ2Fsb3JlMRIwEAYDVQQKDAlNT1NJUFRFU1QxFjAUBgNVBAMMDW1vc2lwdGVz
dC5vcmcwIBcNMjIwNzI4MDYzNTM0WhgPMjEyMjA3MDUwNjM1MzRaMGExCzAJBgNV
BAYTAklOMRIwEAYDVQQIDAlLYXJhbnRha2ExEjAQBgNVBAcMCUJhbmdhbG9yZTES
MBAGA1UECgwJTU9TSVBURVNUMRYwFAYDVQQDDA1tb3NpcHRlc3Qub3JnMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuGyVD2pN4f+arOfLi6D8FH7QLeBQ
O8yRR0it3lVu0LtyoPhj1CEOseEoz/TIn7Z7I8lZ/erenRQz9d3EU0G9gaY+tGdY
lEkoEgXgxakS9sfhKBb2+6hG69twyvrNVsa1LQAnupQ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