-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (35 loc) · 1.6 KB
/
Copy pathDockerfile
File metadata and controls
50 lines (35 loc) · 1.6 KB
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
FROM jumpserver/chen-base:20260821_111128 AS stage-build
ENV LANG=en_US.UTF-8
WORKDIR /opt/chen/
COPY . .
RUN mvn clean package -Dmaven.test.skip=true
FROM debian:trixie-slim
ARG TARGETARCH
ARG DEPENDENCIES=" \
ca-certificates \
openjdk-21-jre-headless"
ARG APT_MIRROR=http://deb.debian.org
# Dockerfile-ee uses the same per-architecture cache IDs for its extra packages.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=chen-apt-cache-${TARGETARCH} \
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=chen-apt-lib-${TARGETARCH} \
set -ex \
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list.d/debian.sources \
&& rm -f /etc/apt/apt.conf.d/docker-clean \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& apt-get update \
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash \
&& sed -i "s@jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1@jdk.tls.disabledAlgorithms=SSLv3@" /etc/java-21-openjdk/security/java.security
WORKDIR /opt/chen
COPY --from=stage-build /usr/local/bin/check /usr/local/bin/wisp /usr/local/bin/
COPY --from=stage-build /opt/chen/backend/web/target/web-*.jar /opt/chen/chen.jar
COPY --from=stage-build /opt/chen/entrypoint.sh .
COPY --from=stage-build /opt/chen/drivers /opt/chen/drivers
COPY --from=stage-build /opt/chen/config/application.yml /opt/chen/config/application.yml
ARG VERSION=dev
ENV VERSION=$VERSION
VOLUME /opt/chen/data
ENTRYPOINT ["./entrypoint.sh"]
EXPOSE 8082
STOPSIGNAL SIGQUIT
CMD [ "wisp" ]