Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

@devcontainer/cli publish templates to GitLab container registry

Đang mở
#934 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
docker, gitlab, typescript
Lĩnh vực
cli, devops

Hướng nghiên cứu

Bắt đầu với lệnh devcontainer templates publish và so sánh các workflow Docker-login và ORAS-login được nêu trong issue. Tái hiện lỗi 401 đối với GitLab container registry bằng trace logging; được xem là hoàn thành khi xác định được lý do các workflow khác nhau và ghi lại hoặc sửa đường dẫn lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

question

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
Ngôn ngữ chính
TypeScript
Star
3k
Fork
461
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của devcontainers/cli

Tất cả issue của devcontainers/cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.