-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
38 lines (30 loc) · 932 Bytes
/
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
# Build stage
FROM maven:3.9.8-eclipse-temurin-21 as build
COPY src /home/app/src
COPY pom.xml /home/app
COPY settings.xml /root/.m2/settings.xml
COPY docker /home/app/docker
ARG SERVER_USERNAME
ARG SERVER_PASSWORD
RUN mvn -f /home/app/pom.xml clean package
# Package stage
FROM eclipse-temurin:21.0.4_7-jre-alpine
MAINTAINER CZERTAINLY <[email protected]>
# add non root user czertainly
RUN addgroup --system --gid 10001 czertainly && adduser --system --home /opt/czertainly --uid 10001 --ingroup czertainly czertainly
COPY --from=build /home/app/docker /
COPY --from=build /home/app/target/*.jar /opt/czertainly/app.jar
WORKDIR /opt/czertainly
ENV JDBC_URL=
ENV JDBC_USERNAME=
ENV JDBC_PASSWORD=
ENV DB_SCHEMA=scheduler
ENV PORT=8080
ENV JAVA_OPTS=
ENV RABBITMQ_HOST=
ENV RABBITMQ_PORT=5672
ENV RABBITMQ_USERNAME=
ENV RABBITMQ_PASSWORD=
ENV RABBITMQ_VHOST=czertainly
USER 10001
ENTRYPOINT ["/opt/czertainly/entry.sh"]