-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
faf169d
commit 19f886c
Showing
3 changed files
with
39 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,5 @@ | ||
ARG VERSION | ||
FROM registry.fit2cloud.com/jumpserver/web-static:v4.0.0 as static | ||
FROM registry.fit2cloud.com/jumpserver/lina:${VERSION} as lina | ||
FROM registry.fit2cloud.com/jumpserver/luna:${VERSION} as luna | ||
FROM registry.fit2cloud.com/jumpserver/applets:${VERSION} as applets | ||
FROM registry.fit2cloud.com/jumpserver/web:${VERSION}-ce | ||
|
||
FROM debian:bookworm-slim as stage-build | ||
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.2 | ||
RUN set -ex \ | ||
&& wget 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 \ | ||
&& mv check /usr/local/bin/ \ | ||
&& chown root:root /usr/local/bin/check \ | ||
&& chmod 755 /usr/local/bin/check \ | ||
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz | ||
|
||
FROM nginx:1.24-bullseye | ||
ARG TARGETARCH | ||
|
||
ARG APT_MIRROR=http://mirrors.ustc.edu.cn | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=web \ | ||
sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \ | ||
&& rm -f /etc/cron.daily/apt-compat \ | ||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends wget vim logrotate locales \ | ||
&& echo "no" | dpkg-reconfigure dash \ | ||
&& echo "zh_CN.UTF-8" | dpkg-reconfigure locales \ | ||
&& rm -f /var/log/nginx/*.log \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /opt | ||
|
||
COPY --from=stage-build /usr/local/bin /usr/local/bin | ||
COPY --from=static /opt /opt | ||
COPY --from=lina /opt/lina /opt/lina | ||
COPY --from=luna /opt/luna /opt/luna | ||
COPY --from=applets /opt/applets /opt/download/applets | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY includes /etc/nginx/includes | ||
COPY default.conf /etc/nginx/conf.d/default.conf | ||
COPY http_server.conf /etc/nginx/sites-enabled/http_server.conf | ||
COPY init.sh /docker-entrypoint.d/40-init-config.sh | ||
COPY --from=static /opt /opt |