Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

@devcontainer/cli publish templates to GitLab container registry

Aperta
#934 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
docker, gitlab, typescript
Ambito
cli, devops

Direzione di ricerca

Inizia con il comando devcontainer templates publish e confronta i workflow Docker-login e ORAS-login mostrati nell’issue. Riproduci il 401 verso un registro di container GitLab con il trace logging; il lavoro è completato quando è stato identificato il motivo per cui i workflow differiscono e il percorso di errore è stato documentato o corretto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
3k
Fork
461
Merge medio
18m
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/cli

Tutte le issue di devcontainers/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.