-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
30 lines (21 loc) · 937 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
FROM adoptopenjdk/openjdk8:jdk8u292-b10
MAINTAINER Stian Conradsen "[email protected]"
RUN mkdir -p /opt/troxy/bin \
/opt/troxy/lib \
/opt/troxy/conf \
/opt/troxy/logs \
/opt/troxy/logs/statistics \
/opt/troxy/data/filters \
/opt/troxy/data/recordings && \
chmod -R a+w /opt/troxy/data/recordings/ && \
useradd --system --user-group troxy
COPY ./local/conf/troxy.properties /opt/troxy/conf/troxy.properties
COPY ./troxy-server/target/troxy-server-*.jar /opt/troxy/lib/
COPY ./troxy-server/target/dependency/* /opt/troxy/lib/
COPY ./filter/target/filter-*.jar /opt/troxy/data/filters/
RUN chown -R troxy /opt/troxy
USER root
WORKDIR /opt/troxy
EXPOSE 8080 443
ENV JAVA_OPTS "-Dtroxy.home=/opt/troxy -XX:+HeapDumpOnOutOfMemoryError"
ENTRYPOINT ["/bin/bash", "-O", "extglob", "-c", "java $JAVA_OPTS -jar lib/troxy-server-*.jar"]