Skip to content

Instantly share code, notes, and snippets.

@maltoe
Created June 4, 2021 10:36
Show Gist options
  • Save maltoe/ed2ba6d44bdef480ef717cfcfc6c5d56 to your computer and use it in GitHub Desktop.
Save maltoe/ed2ba6d44bdef480ef717cfcfc6c5d56 to your computer and use it in GitHub Desktop.
build:
image: docker:19.03.15
services:
- docker:19.03.15-dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY/group/project/image:latest .
- docker push $CI_REGISTRY/group/project/image:latest
variables:
# This is *the way* to disable TLS for dockerd 19. dockerd 20 does not understand this!
# Docker 20 should understand the `--tls=false` command line option according to
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27300
# but I could not get this to work on docker:20.07.15-dind
DOCKER_TLS_CERTDIR: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment