-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (22 loc) · 1.16 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
FROM eclipse-temurin:8-alpine as common
LABEL maintainer="udger.com" description="Udger local parser"
ENV MEECROWAVE_ARCHIVE meecrowave-core-1.2.16-SNAPSHOT-runner
ENV INSTALL_DIR /opt
RUN apk -U upgrade \
&& apk add curl \
&& curl -o ${INSTALL_DIR}/${MEECROWAVE_ARCHIVE}.jar -L https://github.com/udger/openwebbeans-meecrowave/releases/download/1.2.16-SNAPSHOT/meecrowave-core-1.2.16-SNAPSHOT-runner.jar
ENV MEECROWAVE_HOME ${INSTALL_DIR}
ENV DEPLOYMENT_DIR ${MEECROWAVE_HOME}
WORKDIR ${INSTALL_DIR}
COPY ./target/udger-local-api-v4.war ${DEPLOYMENT_DIR}
RUN mkdir -p /udgerdb
FROM common as dev
COPY ./udgerdb_test_v4.dat /udgerdb/udger_test_v4.dat
ENV JAVA_OPTS="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dudger.db=/udgerdb/udger_test_v4.dat"
ENTRYPOINT java ${JAVA_OPTS} -jar ${MEECROWAVE_ARCHIVE}.jar --webapp udger-local-api-v4.war --context udger-local-api-v4
EXPOSE 8080
FROM common as prod
COPY ./udgerdb_v4.dat /udgerdb/udgerdb_v4.dat
ENV JAVA_OPTS="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ENTRYPOINT java ${JAVA_OPTS} -jar ${MEECROWAVE_ARCHIVE}.jar --webapp udger-local-api-v4.war --context udger-local-api-v4
EXPOSE 8080