-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
40 lines (28 loc) · 833 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
39
40
FROM maven:3-openjdk-11 AS build
LABEL description="Wire Texas Holdem bot"
LABEL project="wire-bots:holdem"
WORKDIR /app
# download dependencies
COPY pom.xml ./
RUN mvn verify --fail-never -U
# build
COPY . ./
RUN mvn -Dmaven.test.skip=true package
# runtime stage
FROM wirebot/runtime:1.4.0
RUN mkdir /opt/holdem
RUN mkdir /opt/holdem/cards
RUN mkdir /etc/holdem
COPY --from=build /app/cards/* /opt/holdem/cards/
WORKDIR /opt/holdem
EXPOSE 8080 8081
# Copy configuration
COPY holdem.yaml /etc/holdem/
# Copy built target
COPY --from=build /app/target/holdem.jar /opt/holdem/
# create version file
ARG release_version=development
ENV RELEASE_FILE_PATH=/opt/holdem/release.txt
RUN echo $release_version > $RELEASE_FILE_PATH
EXPOSE 8080 8081
ENTRYPOINT ["java", "-jar", "holdem.jar", "server", "/etc/holdem/holdem.yaml"]