-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
47 lines (32 loc) · 1.3 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
FROM jumpserver/chen-base:20241212_102050 AS stage-build
ENV LANG=en_US.UTF-8
WORKDIR /opt/chen/
COPY . .
RUN cd frontend \
&& npm run build
RUN mvn clean package -Dmaven.test.skip=true
FROM debian:bullseye-slim
ARG DEPENDENCIES=" \
ca-certificates \
openjdk-17-jre-headless"
ARG APT_MIRROR=http://deb.debian.org
RUN set -ex \
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
&& 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 "[email protected]=SSLv3, TLSv1, [email protected]=SSLv3@" /etc/java-17-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" ]