Skip to content

Instantly share code, notes, and snippets.

@guangbochen
Created September 2, 2019 09:49
Show Gist options
  • Save guangbochen/3546e3ffb5cc7198047d65c5efc91465 to your computer and use it in GitHub Desktop.
Save guangbochen/3546e3ffb5cc7198047d65c5efc91465 to your computer and use it in GitHub Desktop.
kind: pipeline
name: default
steps:
- name: docker-mirror
image: docker
volumes:
- name: docker
path: /var/run/
environment:
PASSWORD:
from_secret: docker_password
USERNAME:
from_secret: docker_username
commands:
- docker login -u $USERNAME -p $PASSWORD
- cat ./mirror-images/*.txt | ./scripts/docker-pull-pusher.sh
settings:
custom_dns: 1.1.1.1
when:
ref:
include:
- "refs/heads/master"
event:
- push
volumes:
- name: docker
host:
path: /var/run/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment