forked from cryptobuks/quantizr-open-source-Social-Media
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile-distro
33 lines (26 loc) · 1023 Bytes
/
dockerfile-distro
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
# NOTE: Don't try 'slim' jdk. It's missing the code for our captcha image generation
# and possibly other things
FROM openjdk:17
LABEL maintainer="wclayf@gmail.com"
ARG PORT
ARG PORT_SEC
ARG PORT_DEBUG
ARG JAR_FILE
ARG XMS
ARG XMX
EXPOSE ${PORT}
EXPOSE ${PORT_SEC}
EXPOSE ${PORT_DEBUG}
# Docker Swarm Port (must be open to outside world)
# EXPOSE 4001
# Swarm UDP; should be exposed to the public
# EXPOSE 4001/udp
COPY ${JAR_FILE} app.jar
RUN sh -c 'touch app.jar'
COPY ./entrypoint.sh entrypoint.sh
RUN ["chmod", "+x", "entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
# We had this format for a long time, but then noticed IPFS container was failing finding /bin/bash so I moved to the simpler shell script command above
# ENTRYPOINT ["/bin/bash", "-c", "/quanta/entrypoint.sh"]
# This works too but it's more flexible to just put the commands in 'entrypoint.sh'
# ENTRYPOINT ["/bin/bash", "-c", "java -Xms${XMS} -Xmx${XMX} -Dloader.path=/loader-path -Djava.security.egd=file:/dev/./urandom -jar /quanta/app.jar"]