forked from mosip/mosip-onboarding
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
42 lines (33 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:lts-alpine3.17
RUN npm install -g npm newman newman-reporter-htmlextra pem-jwk
RUN apk add curl && \
apk add openssl && \
apk add jq && \
curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /bin/mc && \
chmod +x /bin/mc
ARG container_user=mosip
ARG container_user_group=mosip
ARG container_user_uid=1001
ARG container_user_gid=1001
# Install packages and create user
RUN addgroup -g ${container_user_gid} ${container_user_group} \
&& adduser -u ${container_user_uid} -G ${container_user_group} -s /bin/bash -D ${container_user}
WORKDIR /home/${container_user}
COPY --chown=${container_user}:${container_user} certs/ ./certs/
COPY *.json ./
COPY *.sh ./
RUN chmod +x certs/*.sh
RUN chmod +x *.sh
# Permissions
RUN chown -R ${container_user}:${container_user} /home/${container_user}
# Select container user for all tasks
USER ${container_user_uid}:${container_user_gid}
ENV MYDIR=`pwd`
ENV DATE="$(date --utc +%FT%T.%3NZ)"
ENV ENABLE_INSECURE=false
ENV MODULE=
ENV s3-host=
ENV s3-region=
ENV s3-user-key=
ENV s3-user-secret=
ENTRYPOINT ["./entrypoint.sh"]