forked from Mixeway/MixewayBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (15 loc) · 684 Bytes
/
Dockerfile
File metadata and controls
21 lines (15 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM maven:3.6-jdk-8 as maven
WORKDIR /app
COPY ./pom.xml ./pom.xml
RUN mvn dependency:go-offline -B
COPY ./src ./src
RUN mvn package -DskipTests && cp target/mixeway-*.jar app.jar
FROM openjdk:8-jre-alpine
LABEL maintainer="gsiewruk@gmail.com"
WORKDIR /app
COPY --from=maven /app/app.jar ./app.jar
COPY src/main/resources/ca.crt /usr/lib/jvm/java-1.8-openjdk/jre/lib/security
RUN \
cd /usr/lib/jvm/java-1.8-openjdk/jre/lib/security \
&& keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias signet -file ca.crt
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROFILE}","-jar", "/app/app.jar"]