-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.cicd
81 lines (64 loc) · 2.75 KB
/
Dockerfile.cicd
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
73
74
75
76
77
78
79
80
81
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 mkdir -p /opt/apps/config \
/opt/dataease2.0/drivers \
/opt/dataease2.0/cache \
/opt/dataease2.0/data/map \
/opt/dataease2.0/data/static-resource \
/opt/dataease2.0/data/appearance \
/opt/dataease2.0/data/exportData \
/opt/dataease2.0/data/plugin
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
RUN set -ex \
&& mkdir -p /opt/apps/config \
&& cd /opt/apps/config \
&& wget https://github.com/wojiushixiaobai/dataease/raw/master/config/application.yml
ADD drivers/* /opt/dataease2.0/drivers/
ADD mapFiles/ /opt/dataease2.0/data/map/
ADD staticResource/ /opt/dataease2.0/data/static-resource/
ADD core/core-backend/target/CoreApplication.jar /opt/apps/app.jar
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" ]