Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
perf: docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jul 25, 2024
1 parent a5cb512 commit 2cd1405
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ RUN set -ex \

FROM alpine:3.20

WORKDIR /tmp
COPY . .
RUN set -ex \
&& apk add --no-cache bash \
&& bash ./prepare.sh

COPY --from=stage-build /opt/applets/build /opt/applets
COPY --from=stage-build /opt/applets/build /opt/download/applets
COPY --from=stage-build /usr/local/bin/check /usr/local/bin/check
10 changes: 3 additions & 7 deletions prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@ PROJECT_DIR=$(cd `dirname $0`; pwd)

DOWNLOAD_URL=https://download.jumpserver.org

if [ -d "/opt/lina" ] && [ -d "/opt/luna" ]; then
PROJECT_DIR=/
fi

mkdir -p ${PROJECT_DIR}/opt/player
cd ${PROJECT_DIR}/opt/player || exit 1
mkdir -p /opt/player
cd /opt/player || exit 1
wget ${DOWNLOAD_URL}/public/glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz
tar -xf glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz -C ${PROJECT_DIR}/opt/player --strip-components 1
rm -f glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz

DOWNLOAD_DIR=${PROJECT_DIR}/opt/download
DOWNLOAD_DIR=/opt/download
mkdir -p ${DOWNLOAD_DIR}/applets
cd ${DOWNLOAD_DIR}/applets || exit 1
wget -O chromedriver-${CHROME_DRIVER_VERSION}-win64.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_DRIVER_VERSION}/chromedriver-win64.zip
Expand Down

0 comments on commit 2cd1405

Please sign in to comment.