Skip to content

Instantly share code, notes, and snippets.

@ncsft
Last active July 14, 2024 20:55
Show Gist options
  • Save ncsft/73ce14c1751094702826ae151a293f64 to your computer and use it in GitHub Desktop.
Save ncsft/73ce14c1751094702826ae151a293f64 to your computer and use it in GitHub Desktop.
Gitlab ci/cd container registry image create
image: node:20
stages:
- build
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
build:
image: docker:26.1
stage: build
services:
- docker:26.1-dind
script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
- docker build -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment