Skip to content

feat: add Kylin CloudShell image and automated build pipeline - #706

Open
JaredTan95 wants to merge 7 commits into
cloudtty:mainfrom
JaredTan95:support_kylin
Open

JaredTan95 wants to merge 7 commits into
cloudtty:mainfrom
JaredTan95:support_kylin

Conversation

@JaredTan95

@JaredTan95 JaredTan95 commented Aug 11, 2026 •

Copy link
Copy Markdown

What changed

  • Add docker/cloudshell/Dockerfile.kylin — a CloudShell image based on Kylin Server Minimal V10 SP3 (cr.kylinos.cn/kylin/kylin-server-minimal:v10sp3) for environments that require a domestic OS runtime.

    • lrzsz is compiled inside a Kylin builder stage so the rz/sz binaries link only against Kylin glibc; no Alpine libraries end up in the runtime image.
    • Full CloudShell toolchain preserved: helm, kubectl, yq, ttyd, git, openssh-clients, jq, procps, findutils, gettext, bash completion and DNS utilities — all installed via microdnf.
    • /root/.bashrc is set up so completion scripts load only in interactive sessions, avoiding breakage under startup.sh's set -o nounset mode.
  • Add .github/workflows/build-kylin-image.yaml — a pipeline that automatically builds the Kylin image for linux/amd64 and linux/arm64 and publishes it as ghcr.io/cloudtty/cloudshell-kylin:<version>:

    • push to main → ghcr.io/cloudtty/cloudshell-kylin:latest
    • version tag (v*) → ghcr.io/cloudtty/cloudshell-kylin:<tag>
    • pull requests touching the Kylin Dockerfile → build-only validation, no push
    • manual trigger via Actions → Build & Release Kylin Image → Run workflow
  • Add make docker-build-kylin / make docker-push-kylin targets and document the image in README.md / README_zh.md.

Why

Kylin (麒麟) is widely deployed in Chinese government and enterprise environments. Previously users on Kylin hosts had to build their own cloudshell image; this PR ships an officially built and CI-published image on a Kylin base.

Validation

  • Base image cr.kylinos.cn/kylin/kylin-server-minimal:v10sp3 is a multi-arch manifest (linux/amd64 + linux/arm64), verified with docker manifest inspect.
  • Full image built successfully on linux/arm64 (frontend, lrzsz, helm/kubectl and runtime stages); rz/sz link only to Kylin glibc.
  • New workflow passes actionlint; the Kylin image build runs green on this PR.

@github-actions

Copy link
Copy Markdown

Hi @JaredTan95,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@JaredTan95 JaredTan95 changed the title feat: add Kylin CloudShell Dockerfile feat: add Kylin CloudShell image and automated build pipeline Aug 14, 2026
@JaredTan95
JaredTan95 force-pushed the support_kylin branch 2 times, most recently from 22fc90a to 009ba4f Compare August 14, 2026 03:06
@JaredTan95
JaredTan95 marked this pull request as ready for review September 14, 2026 10:31
@panpan0000

Copy link
Copy Markdown
Member

需要修复的阻塞问题
PR 构建校验没有覆盖所有影响 Kylin 镜像的输入。

工作流的 pull_request.paths 仅监听 Dockerfile.kylin 和工作流本身;但 Dockerfile 实际还会复制/构建:

html/package.json、html/yarn.lock、html/**
docker/cloudshell/script/startup.sh
docker/cloudshell/script/reset.sh
因此,单独修改前端或启动脚本时,PR 不会运行 Kylin 镜像构建;合入 main 后却会直接触发发布。这样可能把无法构建或运行异常的镜像发布为 latest。

发布工作流把 BuildKit 固定到 moby/buildkit:master。

master 是滚动开发分支,不是稳定发布版本。镜像发布流水线会随时间无提示地使用不同 BuildKit 行为,导致可重复性和发布稳定性变差;也扩大了供应链变动面。这里应删除该覆盖,让 setup-buildx-action 使用默认稳定 BuildKit,或固定到经过验证的明确版本。

@panpan0000

Copy link
Copy Markdown
Member

OCI source label 指向了错误位置。 当前会生成 org.opencontainers.image.source=https://github.com/cloudtty,这是组织页,不是源码仓库。建议使用 https://github.com/${{ github.repository }}。

@panpan0000

Copy link
Copy Markdown
Member

OCI source label 指向了错误位置。 当前会生成 org.opencontainers.image.source=https://github.com/cloudtty,这是组织页,不是源码仓库。建议使用 https://github.com/${{ github.repository }}。

please fix this

JaredTan95 and others added 7 commits September 26, 2026 10:31
Add a CloudShell image based on Kylin Server Minimal V10 SP3
(docker/cloudshell/Dockerfile.kylin) for environments that require a
domestic OS runtime. lrzsz is compiled inside a Kylin builder stage so
rz/sz link only against Kylin glibc, and the full CloudShell toolchain
(helm, kubectl, yq, ttyd, git, SSH, jq, bash completion) is installed
via microdnf.
Add a GitHub Actions pipeline (build-kylin-image.yaml) that builds
docker/cloudshell/Dockerfile.kylin for linux/amd64 and linux/arm64 and
publishes it as ghcr.io/cloudtty/cloudshell-kylin:<version> on main
push, version tags and manual dispatch, with build-only validation on
pull requests. Also add make docker-build-kylin/docker-push-kylin
targets and document the image in README.md and README_zh.md.

polish

polish
…r pin

- Expand pull_request.paths to include html/** and
  docker/cloudshell/script/**, which Dockerfile.kylin also builds/copies,
  so frontend or script changes trigger build validation before merge.
- Apply the same paths filter to the push-to-main trigger so unrelated
  commits don't republish :latest (tag pushes are unaffected).
- Remove driver-opts image=moby/buildkit:master so setup-buildx-action
  uses its default stable BuildKit, improving release reproducibility.

Co-authored-by: Copilot App <[email protected]>
org.opencontainers.image.source was built from IMAGE_REPO (=cloudtty),
producing https://github.com/cloudtty (the org page). Use
github.repository so the label resolves to the actual source repo,
e.g. https://github.com/cloudtty/cloudtty.

Co-authored-by: Copilot App <[email protected]>
Merge the standalone build-kylin-image.yaml into build-image-release.yaml
as a third build step (cloudshell-kylin) alongside the operator and
cloudshell images, and drop the separate workflow file.

While merging, keep the review fixes and apply them consistently:
- pull_request trigger (build-only, no push/login) with paths covering
  docker/**, html/** and the workflow file, so changes to any image
  input are validated before merge.
- paths filter on push-to-main so unrelated commits don't republish
  :latest (tag pushes are unaffected).
- drop the moby/buildkit:master pin; use setup-buildx-action's default
  stable BuildKit.
- OCI source labels use github.repository instead of the org page.

README references updated to point at build-image-release.yaml.

Co-authored-by: Copilot App <[email protected]>
Restore org.opencontainers.image.source to https://github.com/${{ env.IMAGE_REPO }}
for all three image build steps, matching the existing convention on main.

Co-authored-by: Copilot App <[email protected]>
@JaredTan95

Copy link
Copy Markdown
Author

@panpan0000 Thank you for your review. I have made the necessary changes based on your review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants