-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 759 Bytes
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
#############################
# Builder
#############################
FROM adoptopenjdk/openjdk11:jdk-11.0.7_10-alpine-slim as builder
WORKDIR /usr/src/app
ADD . .
RUN ./mvnw clean package -DskipTests
#############################
# Server
#############################
FROM adoptopenjdk/openjdk11:jre-11.0.6_10-alpine
ENV APP_HOME /srv
ENV APP_USER wfuser
ENV APP_UID 9999
ENV APP_GID 9999
WORKDIR $APP_HOME
COPY --from=builder /usr/src/app/target/workflow-graph-manager-*.jar $APP_HOME/workflow-graph-manager.jar
RUN addgroup -S -g $APP_GID $APP_USER \
&& adduser -S -u $APP_UID -G $APP_USER $APP_USER \
&& chown -R $APP_UID:$APP_GID $APP_HOME
USER $APP_UID
CMD ["java", "-ea", "-jar", "/srv/workflow-graph-manager.jar"]
EXPOSE 8080/tcp