Last active
July 14, 2024 20:55
-
-
Save ncsft/73ce14c1751094702826ae151a293f64 to your computer and use it in GitHub Desktop.
Gitlab ci/cd container registry image create
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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