GitLab container registry
PAT access token
From username profile, you need to create a PAT access token with read_registry and write_registry permissions.
Setup container registry per project
- From project
Settings>General>Visibility, project features, permissions, you need to enableContainer Registryfeature. - From project
Settings>Packages & Registries>Container Registry>Container registry cleanup policies, edit cleanup policies to set up auto cleanup of old images: Keep the most recent: 10 tags, and delete tags that are older than 30 days.
Build and push
docker login registry.gitlab.com
docker build -t registry.gitlab.com/jdoes/nextjs-template-ts .
docker push registry.gitlab.com/jdoes/nextjs-template-ts
View containers
Profile > Project name > Deploy > Container registry