-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (39 loc) · 1.5 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM openjdk:jdk-slim as builder
RUN mkdir -p /build/
WORKDIR /build/
COPY . /build/
# Installs maven
RUN apt-get update && \
apt-get install -y maven git
# Roulette
RUN mvn package && \
cd target/ && \
mkdir -p bundle && \
cp ../api_sample.json bundle/ && \
cp ../db_sample.json bundle/ && \
cp $(ls | grep dependencies.jar) bundle/ && \
cd bundle && \
mv *.jar roulette.jar
FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected]"
LABEL license="GPLv3+"
LABEL description="Roulette Docker image"
# Available environment variables:
# -ROULETTE_PORT: custom port in which harbor will run (the default is 80)
# -ROULETTE_API_CONFIG: path to your API configuration json
# -ROULETTE_DATABASE_IP: database IP address
# -ROULETTE_DATABASE_PORT: database port
# -ROULETTE_DATABASE_NAME: main Roulette database name
# -ROULETTE_DATABASE_USERNAME: username which Roulette will use to log in the db
# -ROULETTE_DATABASE_PASSWORD: password which Roulette will use to log in the db
# -ROULETTE_DATABASE_JSON_CONFIG: convenience file to log database settings at once
# -IRONHIDE_INGRESS: default url for Ironhide ingress
# -IRONHIDE_EGRESS: default url for Ironhide egress
ENV ROULETTE_API_CONFIG=api_sample.json
RUN mkdir -p /config/
VOLUME /config/
WORKDIR /srv/
COPY --from=builder /build/target/bundle/roulette.jar /srv/
COPY --from=builder /build/target/bundle/api_sample.json /srv/
COPY --from=builder /build/target/bundle/db_sample.json /srv/
ENTRYPOINT ["java", "-jar", "roulette.jar"]