-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (31 loc) · 1.17 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
FROM openjdk:8-jdk-alpine as build
WORKDIR /workspace/app
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY src src
RUN --mount=type=cache,target=/root/.m2 ./mvnw install -DskipTests
FROM openjdk:8-jdk-alpine
# ARG STARCOIN_MYSQL_URL
# ARG STARCOIN_MYSQL_USER
# ARG STARCOIN_MYSQL_PWD
# ARG STARCOIN_ES_URL
# ARG STARCOIN_ES_PROTOCOL
# ARG STARCOIN_ES_PORT
# ARG STARCOIN_ES_USER
# ARG STARCOIN_ES_PWD
# ENV STARCOIN_MYSQL_URL=$STARCOIN_MYSQL_URL
# ENV STARCOIN_MYSQL_USER=$STARCOIN_MYSQL_USER
# ENV STARCOIN_MYSQL_PWD=$STARCOIN_MYSQL_PWD
# ENV STARCOIN_ES_URL=$STARCOIN_ES_URL
# ENV STARCOIN_ES_PROTOCOL=$STARCOIN_ES_PROTOCOL
# ENV STARCOIN_ES_PORT=$STARCOIN_ES_PORT
# ENV STARCOIN_ES_USER=$STARCOIN_ES_USER
# ENV STARCOIN_ES_PWD=$STARCOIN_ES_PWD
RUN addgroup -S starcoin && adduser -S starcoin -G starcoin
VOLUME /tmp
USER starcoin
ARG DEPENDENCY=/workspace/app/target
COPY --from=build ${DEPENDENCY}/dao-api-0.0.1-SNAPSHOT.jar /app/lib/app.jar
ENTRYPOINT ["java","-noverify","-XX:TieredStopAtLevel=1","-jar","app/lib/app.jar","-Dspring.main.lazy-initialization=true"]
# ,"STARCOIN_MYSQL_URL=$STARCOIN_MYSQL_URL","STARCOIN_MYSQL_USER=$STARCOIN_MYSQL_USER","STARCOIN_MYSQL_PWD=$STARCOIN_MYSQL_PWD"