-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (20 loc) · 1.13 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 alpine:3.19.1
USER root
RUN mkdir -p /deployments
COPY run-java.sh /deployments/
ENV JAVA_APP_DIR=/deployments \
JAVA_OPTIONS="-Dfile.encoding=utf-8" \
LOG4J_FORMAT_MSG_NO_LOOKUPS=true \
JAVA_MAJOR_VERSION=17 \
JAVA_MAX_HEAP_RATIO=40
RUN apk add --update --no-cache tzdata curl fontconfig ttf-dejavu openjdk17-jre nss bash \
&& cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && apk del tzdata \
&& sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/' /usr/lib/jvm/default-jvm/jre/conf/security/java.security \
&& sed -i 's/SSLv3, TLSv1, TLSv1.1, //' /usr/lib/jvm/default-jvm/jre/conf/security/java.security \
&& curl -L --connect-timeout 60 -m 1800 https://fit2cloud-support.oss-cn-beijing.aliyuncs.com/xpack-license/get-validator-linux | sh \
&& rm -rf /tmp/* /var/tmp/* /var/cache/apk/* \
&& chmod 755 /deployments/run-java.sh \
&& adduser -D appuser && addgroup appuser root \
&& chmod 744 /bin/busybox && chmod 744 `which curl` `which apk` \
&& echo "set disable-completion on" >> /etc/inputrc
CMD [ "/deployments/run-java.sh" ]