Created
July 20, 2018 10:20
-
-
Save debuglevel/68c2f63a46d46824e2996139df98637b to your computer and use it in GitHub Desktop.
Using a self signed certificate for docker repository in GitLab
This file contains 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: docker:stable | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
# from https://gitlab.com/gitlab-org/gitlab-runner/issues/1350 | |
services: | |
- name: docker:dind | |
command: | |
- /bin/sh | |
- -c | |
- wget http://MYSERVER/MYCOMPANY.crt -O /usr/local/share/ca-certificates/MYCOMPANY.crt && update-ca-certificates && dockerd-entrypoint.sh || exit | |
stages: | |
- build | |
docker-image: | |
stage: build | |
script: | |
- docker login MYREGISTRY:5000 -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD | |
- docker build -t MYREGISTRY:5000/collectd-server . | |
- docker push MYREGISTRY:5000/collectd-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment