-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (24 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
29 lines (24 loc) · 1.04 KB
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
# Sunbird LMS Service Dockerfile
# Stage 1: Extraction
FROM alpine:3.14 AS builder
RUN apk update && apk add unzip
WORKDIR /app
COPY modules/lms/service/target/lms-service-1.0-SNAPSHOT-dist.zip .
RUN unzip lms-service-1.0-SNAPSHOT-dist.zip
# Stage 2: Runtime
FROM adoptopenjdk/openjdk11:alpine-slim
RUN adduser -u 1001 -h /home/sunbird/ -D sunbird \
&& mkdir -p /home/sunbird/ \
&& apk upgrade --no-cache \
&& apk add --no-cache curl "zlib>=1.3.2-r0"
WORKDIR /home/sunbird/
COPY --from=builder --chown=sunbird:sunbird /app/lms-service-1.0-SNAPSHOT /home/sunbird/lms-service-1.0-SNAPSHOT
COPY modules/lms/service/conf/logback.xml /home/sunbird/lms-service-1.0-SNAPSHOT/conf/logback.xml
USER sunbird
EXPOSE 9000
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS \
-Dlog4j2.formatMsgNoLookups=true \
-Dplay.server.http.idleTimeout=180s \
-Dlogback.configurationFile=/home/sunbird/lms-service-1.0-SNAPSHOT/conf/logback.xml \
-cp '/home/sunbird/lms-service-1.0-SNAPSHOT/lib/*' \
play.core.server.ProdServerStart /home/sunbird/lms-service-1.0-SNAPSHOT