Skip to content

Commit 7315529

Browse files
committed
perf: update healthcheck installation method and remove unused packages
1 parent 8d0dc29 commit 7315529

2 files changed

Lines changed: 5 additions & 19 deletions

File tree

Dockerfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,26 @@ FROM jumpserver/luna:${VERSION} AS luna
55
FROM nginx:1.29-trixie
66
ARG TARGETARCH
77

8-
ARG CHECK_VERSION=v1.0.5
98
ARG APT_MIRROR=http://deb.debian.org
109

1110
ARG TOOLS=" \
1211
ca-certificates \
1312
wget \
1413
curl \
15-
apache2-utils \
16-
vim \
1714
logrotate \
1815
"
1916

2017
RUN set -ex \
2118
&& rm -f /etc/apt/apt.conf.d/docker-clean \
2219
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list.d/debian.sources\
2320
&& apt-get update > /dev/null \
21+
&& apt-get -y upgrade \
2422
&& apt-get -y install --no-install-recommends ${TOOLS} \
23+
&& apt-get -y autoremove \
2524
&& apt-get clean \
26-
&& wget https://github.com/jumpserver-dev/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
27-
&& tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
28-
&& rm -f /etc/nginx/conf.d/default.conf \
29-
&& mv check /usr/local/bin/ \
30-
&& chown root:root /usr/local/bin/check \
31-
&& chmod 755 /usr/local/bin/check \
32-
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
25+
&& wget https://github.com/jumpserver-dev/healthcheck/releases/latest/download/check_linux_${TARGETARCH}.deb \
26+
&& dpkg -i check_linux_${TARGETARCH}.deb \
27+
&& rm -f check_linux_${TARGETARCH}.deb
3328

3429
WORKDIR /opt
3530

init.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ function config_nginx() {
3232
else
3333
sed -i 's@proxy_set_header X-Forwarded-For .*;@proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;@g' "${config_file}"
3434
fi
35-
36-
if [[ -n "${BASIC_AUTH_PASSWORD}" ]] ; then
37-
htpasswd -bc /etc/nginx/.htpasswd ${BASIC_AUTH_USER} ${BASIC_AUTH_PASSWORD}
38-
sed -i "s@# auth_basic @auth_basic @g" "${config_file}"
39-
sed -i "s@# auth_basic_user_file @auth_basic_user_file @g" "${config_file}"
40-
else
41-
sed -i "s@^\([[:space:]]*\)auth_basic @\1# auth_basic @g" "${config_file}"
42-
sed -i "s@^\([[:space:]]*\)auth_basic_user_file @\1# auth_basic_user_file @g" "${config_file}"
43-
fi
4435
}
4536

4637
# helm-charts mount

0 commit comments

Comments
 (0)