@devcontainer/cli publish templates to GitLab container registry
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker, gitlab, typescript
调研方向
从 devcontainer templates publish 命令开始,比较 issue 中展示的 Docker-login 和 ORAS-login 工作流。启用跟踪日志,在 GitLab 容器注册表上重现 401;完成的标准是确定这些工作流为何不同,并记录或修复失败路径。
由索引模型根据 Issue 内容生成。
描述
Related to this issue.
I don't see any update, and that issue was closed, so I created a new one.
TL;DR
It seems that we can publish devcontainer template to GitLab container registry now.
What happened
I tried to publish devcontainer template to self hosted GitLab container registry (v17.3.7-ee), by following the example.
It failed with 401(Could not fetch published tags) as expected, but it worked locally on my machine with the same user and access token.
So I was thinking maybe GitLab container registry start to support OADS now, tried another .gitlab-ci.yml and it worked.
But I didn't see any updates from GitLab saying they start to support OADS in this issue.
Anyone know why the original .gitlab-ci.yml failed, but the new one worked?
I was thinking building a @devcontainer/cli image with more detailed logs, and use it in the original .gitlab-ci.yml to help with the root cause analysis.
My .gitlab-ci.yml
Here's my .gitlab-ci.yml:
image: alpine:3.20
before_script:
- apk add --update nodejs npm curl
- npm install -g @devcontainers/cli
- VERSION="1.2.0"
- curl -LO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
- mkdir -p oras-install/
- tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/
- mv oras-install/oras /usr/local/bin/
- rm -rf oras_${VERSION}_*.tar.gz oras-install/
build:
stage: build
script:
- echo "$PERSONAL_ACCESS_TOKEN" | oras login registry.gitlab.com -u "$PERSONAL_USER" --password-stdin
- devcontainer templates publish --log-level trace -r registry.gitlab.com -n group/project ./src
Here's my original and failed .gitlab-ci.yml:
image: docker:latest
variables:
DOCKER_TLS_CERTDIR: "/certs"
services:
- docker:dind
before_script:
- apk add --update nodejs npm python3 make g++ ca-certificates
- npm install -g @devcontainers/cli
build:
stage: build
script:
- echo "$PERSONAL_ACCESS_TOKEN" | docker login -u "$PERSONAL_USER" registry.gitlab.com --password-stdin
- devcontainer templates publish --log-level trace -r registry.gitlab.com -n group/project ./src
- 主要语言
- TypeScript
- 星标
- 3k
- 派生
- 461
- 平均合并
- 18 分钟
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
devcontainers/cli 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
devcontainers/cli#1203 ·
-
难度 1/5 1-3 小时 新手友好度 68/100
devcontainers/cli#1178 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
devcontainers/cli#1308 ·
-
难度 3/5 1-2 天 新手友好度 78/100
devcontainers/cli#1307 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 55/100
devcontainers/cli#1305 ·
查看 devcontainers/cli 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100