-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from jumpserver/dev
v4.1.0
- Loading branch information
Showing
15 changed files
with
3,677 additions
and
6,087 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build and Push Base Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'pr*' | ||
paths: | ||
- 'go.mod' | ||
- 'Dockerfile-base' | ||
- 'package.json' | ||
- 'yarn.lock' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract date | ||
id: vars | ||
run: echo "IMAGE_TAG=$(date +'%Y%m%d_%H%M%S')" >> $GITHUB_ENV | ||
|
||
- name: Extract repository name | ||
id: repo | ||
run: echo "REPO=$(basename ${{ github.repository }})" >> $GITHUB_ENV | ||
|
||
- name: Build and push multi-arch image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
file: Dockerfile-base | ||
tags: jumpserver/${{ env.REPO }}-base:${{ env.IMAGE_TAG }} | ||
|
||
- name: Update Dockerfile | ||
run: | | ||
sed -i 's|-base:.* AS stage-build|-base:${{ env.IMAGE_TAG }} AS stage-build|' Dockerfile | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add Dockerfile | ||
git commit -m "perf: Update Dockerfile with new base image tag" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM golang:1.22-bullseye AS stage-go-build | ||
|
||
FROM node:20.15-bullseye | ||
COPY --from=stage-go-build /usr/local/go/ /usr/local/go/ | ||
COPY --from=stage-go-build /go/ /go/ | ||
ENV GOPATH=/go | ||
ENV PATH=/go/bin:/usr/local/go/bin:$PATH | ||
ARG TARGETARCH | ||
ARG NPM_REGISTRY="https://registry.npmmirror.com" | ||
ENV NPM_REGISTY=$NPM_REGISTRY | ||
|
||
RUN set -ex \ | ||
&& npm config set registry ${NPM_REGISTRY} \ | ||
&& yarn config set registry ${NPM_REGISTRY} | ||
|
||
WORKDIR /opt | ||
|
||
ARG CHECK_VERSION=v1.0.3 | ||
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 | ||
|
||
WORKDIR /opt/lion/ui | ||
|
||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lion \ | ||
--mount=type=bind,source=ui/package.json,target=package.json \ | ||
--mount=type=bind,source=ui/yarn.lock,target=yarn.lock \ | ||
yarn install | ||
|
||
ENV CGO_ENABLED=0 | ||
ENV GO111MODULE=on | ||
|
||
WORKDIR /opt/lion | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download -x |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Lion | ||
|
||
**简体中文** · [English](./README.md) | ||
|
||
## 介绍 | ||
|
||
该项目使用 Golang 和 Vue 重构了 JumpServer 的 Guacamole 组件,负责 RDP 和 VNC 的连接。 主要基于 [Apache Guacamole](http://guacamole.apache.org/) | ||
开发。 | ||
|
||
## 配置 | ||
|
||
启动的配置文件参考[config_example](config_example.yml) | ||
|
||
## 构建镜像 | ||
|
||
```shell | ||
docker build -t jumpserver/lion . | ||
``` | ||
|
||
## docker启动 | ||
|
||
```shell | ||
docker run -d --name jms_lion -p 8081:8081 \ | ||
-v $(pwd)/data:/opt/lion/data \ | ||
-v $(pwd)/config.yml:/opt/lion/config.yml \ | ||
jumpserver/lion | ||
``` |
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
Oops, something went wrong.