-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
31 lines (22 loc) · 883 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
FROM openjdk:8-jre-slim-buster
ENV NARRATIVE_WAR ${NARRATIVE_WAR}
# make narrative-core directory
RUN mkdir -p /opt/narrative-core/config
RUN mkdir -p /opt/narrative-core/secret
RUN mkdir -p /opt/narrative-core/dataFiles
# install exiftool and others
RUN apt-get update && \
apt-get install -y exiftool imagemagick default-mysql-client
# copy the root war file
COPY target/${NARRATIVE_WAR} /opt/narrative-core/${NARRATIVE_WAR}
# Create the user
RUN useradd user -m -s /bin/bash
ENV HOME /opt/narrative-core
# Set ownership of the folder
RUN chown -R user:user /opt/narrative-core
WORKDIR /opt/narrative-core
USER user
# entrypoint
EXPOSE 8080
ENTRYPOINT ["java"]
CMD ["-Djruby.native.verbose=true", "-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true", "-Djava.net.preferIPv4Stack=true", "-ea", "-server", "-Xms256m", "-Xmx2048m","-jar", "${NARRATIVE_WAR}"]