Skip to content

Commit 96e3fd0

Browse files
Merge pull request #211 from wojiushixiaobai/dev
feat: 更新 v3.10.1
2 parents d9cc89b + 61fd357 commit 96e3fd0

20 files changed

Lines changed: 445 additions & 319 deletions

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
component: [core, koko, lion, kael, chen, magnus, web]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: docker/setup-qemu-action@v3
18+
- uses: docker/setup-buildx-action@v3
19+
- name: Get Version
20+
run: |
21+
echo "version=$(basename ${GITHUB_REF})" >> $GITHUB_ENV
22+
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: wojiushixiaobai
27+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
28+
29+
- name: Login to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.repository_owner }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Build and Push Image
37+
uses: docker/build-push-action@v5
38+
with:
39+
context: .
40+
file: ${{ matrix.component }}/Dockerfile
41+
platforms: linux/amd64,linux/arm64
42+
push: true
43+
tags: |
44+
wojiushixiaobai/jms_${{ matrix.component }}:${{ env.version }}
45+
ghcr.io/wojiushixiaobai/jms_${{ matrix.component }}:${{ env.version }}

allinone/Dockerfile

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN set -ex \
3535
WORKDIR /opt/jumpserver
3636

3737
RUN set -ex \
38-
&& wget -q https://github.com/wojiushixiaobai/jumpserver-patch/raw/master/core/Dockerfile-ce \
38+
&& wget https://github.com/wojiushixiaobai/jumpserver-patch/raw/master/core/Dockerfile-ce \
3939
&& echo > /opt/jumpserver/config.yml \
4040
&& cd utils \
4141
&& bash -ixeu build.sh
@@ -88,15 +88,15 @@ WORKDIR /opt
8888
ARG RUST_VERSION=1.71.1
8989
RUN set -ex \
9090
&& \
91-
if [ "${TARGETARCH}" == "s390x" ] || [ "${TARGETARCH}" == "ppc64le" ] || [ "${TARGETARCH}" == "loong64" ]; then \
91+
if [ "${TARGETARCH}" = "s390x" ] || [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "loong64" ]; then \
9292
rustUrl="https://static.rust-lang.org/dist"; \
9393
rustArch="${TARGETARCH}"; \
9494
mkdir -p /opt/rust-install; \
95-
if [ "${TARGETARCH}" == "loong64" ]; then \
95+
if [ "${TARGETARCH}" = "loong64" ]; then \
9696
rustUrl="download.jumpserver.org/rust/dist"; \
9797
rustArch="loongarch64"; \
9898
fi; \
99-
if [ "${TARGETARCH}" == "ppc64le" ]; then \
99+
if [ "${TARGETARCH}" = "ppc64le" ]; then \
100100
rustArch="powerpc64le"; \
101101
fi; \
102102
wget -O /opt/rust.tar.gz "${rustUrl}/rust-${RUST_VERSION}-${rustArch}-unknown-linux-gnu.tar.xz"; \
@@ -170,12 +170,12 @@ RUN set -ex \
170170
&& case "$dpkgArch" in \
171171
amd64|arm64) \
172172
echo "deb https://nginx.org/packages/debian/ buster nginx" > /etc/apt/sources.list.d/nginx.list \
173-
&& wget -qO - https://nginx.org/keys/nginx_signing.key | apt-key add - \
173+
&& wget -O - https://nginx.org/keys/nginx_signing.key | apt-key add - \
174174
&& apt-get update \
175175
;; \
176176
loongarch64) \
177177
echo "deb https://download.jumpserver.org/nginx/packages/debian buster nginx" > /etc/apt/sources.list.d/nginx.list \
178-
&& wget -qO - https://download.jumpserver.org/nginx/packages/keys/nginx_signing.key | apt-key add - \
178+
&& wget -O - https://download.jumpserver.org/nginx/packages/keys/nginx_signing.key | apt-key add - \
179179
&& apt-get update \
180180
;; \
181181
*) \
@@ -206,15 +206,15 @@ RUN set -ex \
206206
&& \
207207
case "${TARGETARCH}" in \
208208
amd64) \
209-
wget -q https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-x64.tgz \
209+
wget https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-x64.tgz \
210210
&& tar -xf mongosh-${MONGOSH_VERSION}-linux-x64.tgz \
211211
&& chown root:root mongosh-${MONGOSH_VERSION}-linux-x64/bin/* \
212212
&& mv mongosh-${MONGOSH_VERSION}-linux-x64/bin/mongosh /usr/local/bin/ \
213213
&& mv mongosh-${MONGOSH_VERSION}-linux-x64/bin/mongosh_crypt_v1.so /usr/local/lib/ \
214214
&& rm -rf mongosh-${MONGOSH_VERSION}-linux-x64* \
215215
;; \
216216
arm64|s390x|ppc64le) \
217-
wget -q https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${TARGETARCH}.tgz \
217+
wget https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${TARGETARCH}.tgz \
218218
&& tar -xf mongosh-${MONGOSH_VERSION}-linux-${TARGETARCH}.tgz \
219219
&& chown root:root mongosh-${MONGOSH_VERSION}-linux-${TARGETARCH}/bin/* \
220220
&& mv mongosh-${MONGOSH_VERSION}-linux-${TARGETARCH}/bin/mongosh /usr/local/bin/ \
@@ -230,22 +230,22 @@ ARG HELM_VERSION=v3.12.2
230230
ARG KUBECTL_VERSION=v1.27.4
231231
RUN set -ex \
232232
&& \
233-
if [ "${TARGETARCH}" == "loong64" ]; then \
234-
wget -q https://download.jumpserver.org/public/kubectl-linux-${TARGETARCH}.tar.gz; \
233+
if [ "${TARGETARCH}" = "loong64" ]; then \
234+
wget https://download.jumpserver.org/public/kubectl-linux-${TARGETARCH}.tar.gz; \
235235
tar -xf kubectl-linux-${TARGETARCH}.tar.gz; \
236236
mv kubectl /usr/local/bin/rawkubectl; \
237237
else \
238-
wget -q -O /usr/local/bin/rawkubectl https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl; \
238+
wget -O /usr/local/bin/rawkubectl https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl; \
239239
fi \
240-
&& wget -q http://download.jumpserver.org/public/kubectl_aliases.tar.gz \
240+
&& wget http://download.jumpserver.org/public/kubectl_aliases.tar.gz \
241241
&& mkdir /opt/kubectl-aliases/ \
242242
&& tar -xf kubectl_aliases.tar.gz -C /opt/kubectl-aliases/ \
243243
&& chown -R root:root /opt/kubectl-aliases/ \
244244
&& \
245-
if [ "${TARGETARCH}" == "loong64" ]; then \
246-
wget -q https://github.com/wojiushixiaobai/helm-loongarch64/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz; \
245+
if [ "${TARGETARCH}" = "loong64" ]; then \
246+
wget https://github.com/wojiushixiaobai/helm-loongarch64/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz; \
247247
else \
248-
wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz; \
248+
wget https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz; \
249249
fi \
250250
&& tar -xf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz -C /opt --strip-components=1 linux-${TARGETARCH}/helm \
251251
&& mv helm /usr/local/bin/rawhelm \
@@ -255,7 +255,7 @@ RUN set -ex \
255255

256256
ARG WISP_VERSION=v0.1.16
257257
RUN set -ex \
258-
&& wget -q https://github.com/jumpserver/wisp/releases/download/${WISP_VERSION}/wisp-${WISP_VERSION}-linux-${TARGETARCH}.tar.gz \
258+
&& wget https://github.com/jumpserver/wisp/releases/download/${WISP_VERSION}/wisp-${WISP_VERSION}-linux-${TARGETARCH}.tar.gz \
259259
&& tar -xf wisp-${WISP_VERSION}-linux-${TARGETARCH}.tar.gz -C /usr/local/bin/ --strip-components=1 \
260260
&& chown root:root /usr/local/bin/wisp \
261261
&& chmod 755 /usr/local/bin/wisp \
@@ -293,7 +293,7 @@ WORKDIR /opt
293293

294294
RUN set -ex \
295295
&& mkdir -p /opt/koko \
296-
&& wget -q https://github.com/jumpserver/koko/releases/download/${VERSION}/koko-${VERSION}-linux-${TARGETARCH}.tar.gz \
296+
&& wget https://github.com/jumpserver/koko/releases/download/${VERSION}/koko-${VERSION}-linux-${TARGETARCH}.tar.gz \
297297
&& tar -xf koko-${VERSION}-linux-${TARGETARCH}.tar.gz -C /opt/koko/ --strip-components=1 \
298298
&& mv /opt/koko/kubectl /usr/local/bin/ \
299299
&& mv /opt/koko/helm /usr/local/bin/ \
@@ -303,51 +303,51 @@ RUN set -ex \
303303

304304
RUN set -ex \
305305
&& mkdir -p /opt/lion \
306-
&& wget -q https://github.com/jumpserver/lion-release/releases/download/${VERSION}/lion-${VERSION}-linux-${TARGETARCH}.tar.gz \
306+
&& wget https://github.com/jumpserver/lion-release/releases/download/${VERSION}/lion-${VERSION}-linux-${TARGETARCH}.tar.gz \
307307
&& tar -xf lion-${VERSION}-linux-${TARGETARCH}.tar.gz -C /opt/lion --strip-components=1 \
308308
&& chown -R root:root /opt/lion \
309309
&& rm -f /opt/*.tar.gz
310310

311311
RUN set -ex \
312312
&& mkdir -p /opt/magnus \
313-
&& wget -q https://github.com/jumpserver/magnus-release/releases/download/${VERSION}/magnus-${VERSION}-linux-${TARGETARCH}.tar.gz \
313+
&& wget https://github.com/jumpserver/magnus-release/releases/download/${VERSION}/magnus-${VERSION}-linux-${TARGETARCH}.tar.gz \
314314
&& tar -xf magnus-${VERSION}-linux-${TARGETARCH}.tar.gz -C /opt/magnus --strip-components=1 \
315315
&& chmod 755 /opt/magnus/magnus \
316316
&& chown -R root:root /opt/magnus \
317317
&& rm -f /opt/*.tar.gz
318318

319319
RUN set -ex \
320320
&& mkdir -p /opt/kael \
321-
&& wget -q https://github.com/jumpserver/kael/releases/download/${VERSION}/kael-${VERSION}-linux-${TARGETARCH}.tar.gz \
321+
&& wget https://github.com/jumpserver/kael/releases/download/${VERSION}/kael-${VERSION}-linux-${TARGETARCH}.tar.gz \
322322
&& tar -xf kael-${VERSION}-linux-${TARGETARCH}.tar.gz -C /opt/kael --strip-components=1 \
323323
&& chmod 755 /opt/kael/kael \
324324
&& chown -R root:root /opt/kael \
325325
&& rm -f /opt/*.tar.gz
326326

327327
RUN set -ex \
328328
&& mkdir -p /opt/chen \
329-
&& wget -q https://github.com/jumpserver/chen-release/releases/download/${VERSION}/chen-${VERSION}.tar.gz \
329+
&& wget https://github.com/jumpserver/chen-release/releases/download/${VERSION}/chen-${VERSION}.tar.gz \
330330
&& tar -xf chen-${VERSION}.tar.gz -C /opt/chen --strip-components=1 \
331331
&& chown -R root:root /opt/chen \
332332
&& rm -f /opt/*.tar.gz
333333

334334
RUN set -ex \
335335
&& mkdir -p /opt/lina \
336-
&& wget -q https://github.com/jumpserver/lina/releases/download/${VERSION}/lina-${VERSION}.tar.gz \
336+
&& wget https://github.com/jumpserver/lina/releases/download/${VERSION}/lina-${VERSION}.tar.gz \
337337
&& tar -xf lina-${VERSION}.tar.gz -C /opt/lina --strip-components=1 \
338338
&& chown -R root:root /opt/lina \
339339
&& rm -f /opt/*.tar.gz
340340

341341
RUN set -ex \
342342
&& mkdir -p /opt/luna \
343-
&& wget -q https://github.com/jumpserver/luna/releases/download/${VERSION}/luna-${VERSION}.tar.gz \
343+
&& wget https://github.com/jumpserver/luna/releases/download/${VERSION}/luna-${VERSION}.tar.gz \
344344
&& tar -xf luna-${VERSION}.tar.gz -C /opt/luna --strip-components=1 \
345345
&& chown -R root:root /opt/luna \
346346
&& rm -f /opt/*.tar.gz
347347

348348
RUN set -ex \
349349
&& cd /opt/download/applets \
350-
&& wget -q https://github.com/jumpserver/applets/releases/download/${VERSION}/pip_packages.zip
350+
&& wget https://github.com/jumpserver/applets/releases/download/${VERSION}/pip_packages.zip
351351

352352
COPY readme.txt readme.txt
353353
COPY entrypoint.sh .

chen/Dockerfile

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
1-
FROM jumpserver/openjdk:17-slim-buster as openjdk
2-
FROM debian:buster-slim
1+
FROM jumpserver/openjdk:17-slim-bullseye as stage-1
2+
FROM debian:bullseye-slim as stage-2
33
ARG TARGETARCH
4-
ENV LANG=en_US.UTF-8
54

65
ARG DEPENDENCIES=" \
76
ca-certificates \
8-
curl \
9-
p11-kit \
107
wget"
118

12-
RUN set -ex \
9+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
10+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
11+
set -ex \
12+
&& rm -f /etc/apt/apt.conf.d/docker-clean \
1313
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
1414
&& apt-get update \
15-
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
16-
&& echo "no" | dpkg-reconfigure dash \
17-
&& sed -i "s@# export @export @g" ~/.bashrc \
18-
&& sed -i "s@# alias @alias @g" ~/.bashrc \
19-
&& apt-get clean all \
20-
&& rm -rf /var/lib/apt/lists/*
21-
22-
ENV JAVA_HOME /usr/local/openjdk-17
23-
ENV PATH $JAVA_HOME/bin:$PATH
15+
&& apt-get -y install --no-install-recommends ${DEPENDENCIES}
2416

25-
COPY --from=openjdk $JAVA_HOME $JAVA_HOME
26-
COPY --from=openjdk /etc/ld.so.conf.d/docker-openjdk.conf /etc/ld.so.conf.d/docker-openjdk.conf
27-
COPY --from=openjdk /etc/ca-certificates/update.d/docker-openjdk /etc/ca-certificates/update.d/docker-openjdk
17+
WORKDIR /opt
2818

19+
ARG CHECK_VERSION=v1.0.1
2920
RUN set -ex \
30-
&& chmod +x /etc/ca-certificates/update.d/docker-openjdk \
31-
&& /etc/ca-certificates/update.d/docker-openjdk \
32-
&& ldconfig \
33-
&& java -Xshare:dump \
34-
&& rm -rf ~/.java \
35-
&& javac --version \
36-
&& java --version
37-
38-
WORKDIR /opt
21+
&& wget https://github.com/wojiushixiaobai/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
22+
&& tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
23+
&& mv check /usr/local/bin/ \
24+
&& chown root:root /usr/local/bin/check \
25+
&& chmod 755 /usr/local/bin/check \
26+
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
3927

4028
ARG WISP_VERSION=v0.1.16
4129
RUN set -ex \
@@ -60,6 +48,47 @@ RUN set -ex \
6048
COPY chen/entrypoint.sh .
6149
RUN chmod 755 ./entrypoint.sh
6250

51+
FROM debian:bullseye-slim
52+
ENV LANG=en_US.UTF-8
53+
54+
ARG DEPENDENCIES=" \
55+
ca-certificates \
56+
p11-kit"
57+
58+
RUN set -ex \
59+
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
60+
&& apt-get update \
61+
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \
62+
&& echo "no" | dpkg-reconfigure dash \
63+
&& sed -i "s@# export @export @g" ~/.bashrc \
64+
&& sed -i "s@# alias @alias @g" ~/.bashrc \
65+
&& apt-get clean all \
66+
&& rm -rf /var/lib/apt/lists/*
67+
68+
ENV JAVA_HOME /usr/local/openjdk-17
69+
ENV PATH $JAVA_HOME/bin:$PATH
70+
71+
COPY --from=stage-1 $JAVA_HOME $JAVA_HOME
72+
COPY --from=stage-1 /etc/ld.so.conf.d/docker-openjdk.conf /etc/ld.so.conf.d/docker-openjdk.conf
73+
COPY --from=stage-1 /etc/ca-certificates/update.d/docker-openjdk /etc/ca-certificates/update.d/docker-openjdk
74+
75+
RUN set -ex \
76+
&& chmod +x /etc/ca-certificates/update.d/docker-openjdk \
77+
&& /etc/ca-certificates/update.d/docker-openjdk \
78+
&& ldconfig \
79+
&& java -Xshare:dump \
80+
&& rm -rf ~/.java \
81+
&& javac --version \
82+
&& java --version
83+
84+
COPY --from=stage-2 /usr/local/bin /usr/local/bin
85+
COPY --from=stage-2 /opt/chen /opt/chen
86+
87+
WORKDIR /opt/chen
88+
89+
ARG VERSION=v3.10.1
90+
ENV VERSION=${VERSION}
91+
6392
VOLUME /opt/chen/data
6493

6594
EXPOSE 8082

chen/entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
#
33

4-
while [ "$(curl -I -m 10 -L -k -o /dev/null -s -w %{http_code} ${CORE_HOST}/api/health/)" != "200" ]
5-
do
4+
until /usr/local/bin/check ${CORE_HOST}/api/health/; do
65
echo "wait for jms_core ${CORE_HOST} ready"
76
sleep 2
87
done

0 commit comments

Comments
 (0)