Skip to content

Commit

Permalink
Merge pull request #8 from northsea4/rename_image
Browse files Browse the repository at this point in the history
Rename image
  • Loading branch information
northsea4 committed Feb 23, 2023
2 parents aa1ee55 + 0c2ad3a commit fc4248e
Show file tree
Hide file tree
Showing 27 changed files with 158 additions and 123 deletions.
10 changes: 5 additions & 5 deletions .env.versions
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 本项目版本
PROJECT_VERSION=0.4.13
PROJECT_VERSION=0.5.0

#=== start === gui-base images ==========================

# `stainless403/gui-base`镜像版本
GUI_BASE_VERSION=0.3.0

# `stainless403/gui-base_mdcx-builtin`镜像版本
# `stainless403/mdcx-builtin-gui-base`镜像版本
GUI_BASE_MDCX_BUILTIN_VERSION=20230222

# `stainless403/gui-base_mdcx-src`镜像版本
# `stainless403/mdcx-src-gui-base`镜像版本
GUI_BASE_MDCX_SRC_VERSION=0.1.2

#=== end === gui-base images ==========================
Expand All @@ -20,10 +20,10 @@ GUI_BASE_MDCX_SRC_VERSION=0.1.2
# `stainless403/webtop-base`镜像版本
WEBTOP_BASE_VERSION=0.1.0

# `stainless403/webtop-base_mdcx-builtin`镜像版本
# `stainless403/mdcx-builtin-webtop-base`镜像版本
WEBTOP_BASE_MDCX_BUILTIN_VERSION=20230222

# `stainless403/webtop-base_mdcx-src`镜像版本
# `stainless403/mdcx-src-webtop-base`镜像版本
WEBTOP_BASE_MDCX_SRC_VERSION=0.1.3

#=== end === webtop-base images ==========================
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-mdcx-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-mdcx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,31 @@ jobs:
run: |
mkdir mdcx-docker && cd mdcx-docker && cp -a ../gui-base/. .
cp .env.sample .env
cp gui-base-src.sample.yml docker-compose.yml
cp mdcx-src.sample.yml docker-compose.yml
rm Dockerfile*
rm -rf rootfs*
cd ..
zip -q -r template-gui-base-src.zip mdcx-docker
zip -q -r template-mdcx-src-gui-base.zip mdcx-docker
cd mdcx-docker
cp -f gui-base-builtin.sample.yml docker-compose.yml
cp -f mdcx-builtin.sample.yml docker-compose.yml
cd ..
zip -q -r template-gui-base-builtin.zip mdcx-docker
zip -q -r template-mdcx-builtin-gui-base.zip mdcx-docker
rm -rf mdcx-docker
mkdir mdcx-docker && cd mdcx-docker && cp -a ../webtop-base/. .
cp .env.sample .env
cp webtop-base-src.sample.yml docker-compose.yml
cp mdcx-src.sample.yml docker-compose.yml
rm Dockerfile*
rm -rf rootfs*
cd ..
zip -q -r template-webtop-base-src.zip mdcx-docker
zip -q -r template-mdcx-src-webtop-base.zip mdcx-docker
cd mdcx-docker
cp -f webtop-base-builtin.sample.yml docker-compose.yml
cp -f mdcx-builtin.sample.yml docker-compose.yml
cd ..
zip -q -r template-webtop-base-builtin.zip mdcx-docker
zip -q -r template-mdcx-builtin-webtop-base.zip mdcx-docker
rm -rf mdcx-docker
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gui-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Image gui-base_mdcx_builtin CI
name: Image mdcx-builtin-gui-base CI

on:
push:
Expand Down Expand Up @@ -32,7 +32,8 @@ on:

env:
IMAGE_BASE: gui-base
IMAGE_KEY: gui-base_mdcx-builtin
IMAGE_KEY: mdcx-builtin-gui-base
DEPRECATED_IMAGE_KEY: gui-base_mdcx-builtin

jobs:
build:
Expand Down Expand Up @@ -113,8 +114,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand All @@ -127,4 +128,6 @@ jobs:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Image webtop-base_mdcx-builtin CI
name: Image mdcx-builtin-webtop-base CI

on:
push:
Expand Down Expand Up @@ -32,7 +32,8 @@ on:

env:
IMAGE_BASE: webtop-base
IMAGE_KEY: webtop-base_mdcx-builtin
IMAGE_KEY: mdcx-builtin-webtop-base
DEPRECATED_IMAGE_KEY: webtop-base_mdcx-builtin

jobs:
build:
Expand Down Expand Up @@ -113,8 +114,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand All @@ -127,4 +128,6 @@ jobs:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Image gui-base_mdcx-src CI
name: Image mdcx-src-gui-base CI

on:
push:
Expand All @@ -24,7 +24,8 @@ on:

env:
IMAGE_BASE: gui-base
IMAGE_KEY: gui-base_mdcx-src
IMAGE_KEY: mdcx-src-gui-base
DEPRECATED_IMAGE_KEY: gui-base_mdcx-src

jobs:
build:
Expand Down Expand Up @@ -76,8 +77,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand All @@ -88,4 +89,6 @@ jobs:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Image webtop-base_mdcx-src CI
name: Image mdcx-src-webtop-base CI

on:
push:
Expand All @@ -24,7 +24,8 @@ on:

env:
IMAGE_BASE: webtop-base
IMAGE_KEY: webtop-base_mdcx-src
IMAGE_KEY: mdcx-src-webtop-base
DEPRECATED_IMAGE_KEY: webtop-base_mdcx-src

jobs:
build:
Expand Down Expand Up @@ -68,8 +69,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand All @@ -80,4 +81,6 @@ jobs:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.latest }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.DEPRECATED_IMAGE_KEY }}:${{ steps.imageInfo.outputs.version }}
25 changes: 14 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ on:
type: boolean

jobs:
mdcx-base:
mdcx-src-gui-base:
runs-on: ubuntu-latest
name: Test mdcx-base
name: Test mdcx-src-gui-base
steps:
-
name: Checkout
Expand All @@ -35,14 +35,14 @@ jobs:
uses: cardinalby/export-env-action@v2
id: versions
with:
envFile: '.env.versions'
envFile: 'gui-base/.env.versions'
export: 'false'
-
name: Prepare env
uses: cardinalby/export-env-action@v2
id: appEnv
with:
envFile: '.env.sample'
envFile: 'gui-base/.env.sample'
export: 'false'
-
name: Run container
Expand All @@ -63,11 +63,11 @@ jobs:
mkdir -m 777 -p ./movies
bash ./update-app.sh --verbose --restart false
cd gui-base
bash ./update-src.sh --verbose --restart false
cp docker-compose.mdcx-base.sample.yml docker-compose.yml
cp mdcx-src.sample.yml docker-compose.yml
# TODO 镜像缓存
docker-compose -f docker-compose.yml up -d
-
if: ${{ github.event.inputs.release == 'true' }}
Expand All @@ -83,7 +83,7 @@ jobs:
timeout=60
while true
do
isRunning=$(docker inspect ${{ steps.appEnv.outputs.CONTAINER_NAME }} | grep '"Status": "running"')
isRunning=$(docker inspect ${{ steps.appEnv.outputs.MDCX_SRC_CONTAINER_NAME }} | grep '"Status": "running"')
if [[ -n "$isRunning" ]]; then
echo "✅ 已检测到容器Status=running"
exit 0
Expand Down Expand Up @@ -125,13 +125,16 @@ jobs:
chmod +x /opt/regctl
echo "✅ regctl downloaded successfully"
NAME="stainless403/test-mdcx-base"
NAME="stainless403/mdcx-src-gui-base"
DEPRECATED_NAME="stainless403/gui-base_mdcx-src"
# 因为这里的环境只是amd64,如果直接docker tag 然后 push,只会创建amd64架构的tag。
# `regctl`工具可以在不需要下载镜像文件的情况下,快速为已有的multi-arch镜像创建新tag
/opt/regctl image copy $NAME:latest-dev $NAME:latest
/opt/regctl image copy $NAME:latest-dev $NAME:${{ steps.versions.outputs.MDCX_BASE_IMAGE_VERSION }}
/opt/regctl image copy -v info $NAME:latest-dev $NAME:latest
/opt/regctl image copy -v info $NAME:latest-dev $NAME:${{ steps.runContainer.outputs.APP_VERSION }}
/opt/regctl image copy -v info $NAME:latest-dev $DEPRECATED_NAME:latest
/opt/regctl image copy -v info $NAME:latest-dev $DEPRECATED_NAME:${{ steps.runContainer.outputs.APP_VERSION }}
-
# TODO 没有`/var/lib/docker`目录权限,缓存失败!
name: Cache puppeteer-headful image
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/webtop-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
# cache-from: type=gha
# cache-to: type=gha,mode=min
file: ${{ env.IMAGE_BASE }}/Dockerfile.${{ env.IMAGE_KEY }}
build-args: |
APT_SOURCE_HOST=
Expand Down
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
## 镜像
| 镜像 | 部署说明 | Web | RDP | 文件管理 | 浏览器 |
⚠️ 更改了镜像名称:`gui-base_mdcx-builtin` 更改为 `mdcx-builtin-gui-base`

⚠️ 更改了镜像名称:`webtop-base_mdcx-builtin` 更改为 `mdcx-builtin-webtop-base`

> 短期内旧名称镜像仍会存在,但建议尽快使用新名称镜像。
---


| 镜像 | 部署说明 | 网页查看 | 远程桌面 | 文件管理 | 浏览器 |
| --- | --- | --- | --- | --- | --- |
| [gui-base_mdcx-builtin](https://hub.docker.com/r/stainless403/gui-base_mdcx-builtin/tags) | [查看](https://github.com/northsea4/mdcx-docker/blob/main/docs/gui-base.md) |||||
| [webtop-base_mdcx-builtin](https://hub.docker.com/r/stainless403/webtop-base_mdcx-builtin/tags) | [查看](https://github.com/northsea4/mdcx-docker/blob/main/docs/webtop-base.md) |||||
| [mdcx-builtin-gui-base](https://hub.docker.com/r/stainless403/mdcx-builtin-gui-base/tags) | [查看](https://github.com/northsea4/mdcx-docker/blob/main/docs/gui-base.md) |||||
| [mdcx-builtin-webtop-base](https://hub.docker.com/r/stainless403/mdcx-builtin-webtop-base/tags) | [查看](https://github.com/northsea4/mdcx-docker/blob/main/docs/webtop-base.md) |||||

### gui-base_mdcx-builtin示例
### mdcx-builtin-gui-base示例
⚠️ 这里只给出一个简单的运行示例,建议查看 [部署说明](https://github.com/northsea4/mdcx-docker/blob/main/docs/gui-base.md) 了解更多细节。

```bash
Expand All @@ -31,12 +39,12 @@ docker run -d --name mdcx \
-e USER_ID=$(id -u) `#运行应用的用户ID` \
-e GROUP_ID=$(id -g) `#运行应用的用户组ID` \
--restart unless-stopped \
stainless403/gui-base_mdcx-builtin:latest
stainless403/mdcx-builtin-gui-base:latest
```

浏览器访问 http://192.168.1.100:5800 使用。

### webtop-base_mdcx-builtin示例
### mdcx-builtin-webtop-base示例
⚠️ 这里只给出一个简单的运行示例,建议查看 [部署说明](https://github.com/northsea4/mdcx-docker/blob/main/docs/webtop-base.md) 了解更多细节。

```bash
Expand All @@ -59,7 +67,7 @@ docker run -d --name mdcx \
-e USER_ID=$(id -u) `#运行应用的用户ID` \
-e GROUP_ID=$(id -g) `#运行应用的用户组ID` \
--restart unless-stopped \
stainless403/webtop-base_mdcx-builtin:latest
stainless403/mdcx-builtin-webtop-base:latest
```

- 使用`Windows远程桌面``Microsoft Remote Desktop`连接 `192.168.1.100:3389` 使用,账号密码`abc/abc`
Expand All @@ -71,8 +79,8 @@ docker run -d --name mdcx \

| 镜像 | 默认 | 方式1 |
| --- | --- | --- |
| [gui-base_mdcx-builtin](https://hub.docker.com/r/stainless403/gui-base_mdcx-builtin/tags) || 设置环境变量`VNC_PASSWORD` |
| [webtop-base_mdcx-builtin](https://hub.docker.com/r/stainless403/webtop-base_mdcx-builtin/tags) | abc/abc | `docker exec -it 容器名称 passwd abc`<br>或进入桌面使用命令行工具执行`passwd abc` |
| [mdcx-builtin-gui-base](https://hub.docker.com/r/stainless403/mdcx-builtin-gui-base/tags) || 设置环境变量`VNC_PASSWORD` |
| [mdcx-builtin-webtop-base](https://hub.docker.com/r/stainless403/mdcx-builtin-webtop-base/tags) | abc/abc | `docker exec -it 容器名称 passwd abc`<br>或进入桌面使用命令行工具执行`passwd abc` |

## 申明
当你查阅、下载了本项目源代码或二进制程序,即代表你接受了以下条款:
Expand Down
Loading

0 comments on commit fc4248e

Please sign in to comment.