-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
72 lines (56 loc) · 2.49 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM debian:trixie-slim AS builder
ARG TARGETARCH
ARG DEPENDENCIES=" \
ca-certificates \
wget"
RUN set -ex \
&& apt-get update \
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt
ARG CHECK_VERSION=v1.0.3
RUN set -e \
&& wget --quiet https://github.com/jumpserver-dev/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
&& tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz -C /usr/local/bin/ check \
&& chown root:root /usr/local/bin/check \
&& chmod 755 /usr/local/bin/check \
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
RUN set -ex \
&& mkdir -p /deployments \
&& cd /deployments \
&& wget https://github.com/fabric8io-images/run-java-sh/raw/master/fish-pepper/run-java-sh/fp-files/run-java.sh \
&& chmod +x run-java.sh
ARG VERSION=v2.10.0
RUN set -ex \
&& wget https://github.com/wojiushixiaobai/dataease/releases/download/${VERSION}/dataease-${VERSION}.tar.gz \
&& tar -xf dataease-${VERSION}.tar.gz -C /opt --strip-components=1 \
&& rm -f dataease-${VERSION}.tar.gz \
&& mkdir -p /opt/apps/config \
&& cd /opt/apps/config \
&& wget https://github.com/wojiushixiaobai/dataease/raw/master/config/application.yml
FROM debian:trixie-slim
ARG TARGETARCH
ARG DEPENDENCIES=" \
ca-certificates \
openjdk-21-jre-headless"
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash \
&& echo "securerandom.source=file:/dev/urandom" >> /etc/java-21-openjdk/security/java.security \
&& sed -i "[email protected]=SSLv3, TLSv1, TLSv1.1, @jdk.tls.disabledAlgorithms=@" /etc/java-21-openjdk/security/java.security \
&& sed -i "s@# export @export @g" ~/.bashrc \
&& sed -i "s@# alias @alias @g" ~/.bashrc \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt /opt
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /deployments/run-java.sh /deployments/run-java.sh
WORKDIR /opt/apps
ENV JAVA_APP_JAR=/opt/apps/app.jar \
RUNNING_PORT=8100
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Dloader.path=/opt/apps -Dspring.config.additional-location=/opt/apps/config/"
EXPOSE 8100
CMD [ "/deployments/run-java.sh" ]