forked from zhangliqiang/fabric8-java-alpine-openjdk8-jre
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
26 lines (18 loc) · 752 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
FROM alpine:3.8
MAINTAINER https://github.com/zhangliqiang/fabric8-java-alpine-openjdk8-jre
USER root
RUN mkdir -p /deployments
# JAVA_APP_DIR is used by run-java.sh for finding the binaries
ENV JAVA_APP_DIR=/deployments \
JAVA_MAJOR_VERSION=8
# /dev/urandom is used as random source, which is perfectly safe
# according to http://www.2uo.de/myths-about-urandom/
RUN apk add --update \
curl \
openjdk8-jre-base=8.171.11-r0 \
&& rm /var/cache/apk/* \
&& echo "securerandom.source=file:/dev/urandom" >> /usr/lib/jvm/default-jvm/jre/lib/security/java.security
# Add run script as /deployments/run-java.sh and make it executable
COPY run-java.sh /deployments/
RUN chmod 755 /deployments/run-java.sh
CMD [ "/deployments/run-java.sh" ]