@devcontainer/cli publish templates to GitLab container registry
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, gitlab, typescript
Research direction
Start with the devcontainer templates publish command and compare the Docker-login and ORAS-login workflows shown in the issue. Reproduce the 401 against a GitLab container registry with trace logging; done means identifying why the workflows differ and documenting or fixing the failure path.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 461
- Avg merge
- 18m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devcontainers/cli
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
devcontainers/cli#1203 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
devcontainers/cli#1178 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
devcontainers/cli#1308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
devcontainers/cli#1307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
devcontainers/cli#1305 ·
All issues in devcontainers/cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·