blob: 2b323d0f3518081d8f16974c67b7a559b2371321 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
---
# hosts: debian, arch
- name: Install Docker Registry on Alpine LXC Container
hosts: docker_alpine_lxc
vars_files:
- ../variables.yml
tasks:
- name: Including docker bootstrap for alpine
include: alpine.yml
- name: Creating docker registry folder
file:
path: /opt/docker/registry
state: directory
- name: Clearing residual containers
shell: >
{ docker stop $(docker ps -aq) || true; } &&
{ docker container prune --force || true; }
register: output
- debug: var=output
- name: Creating docker registry
docker_container:
name: registry
image: registry:{{ docker_registry_version }}
restart_policy: always
ports:
- "5000:5000"
volumes:
- "/opt/docker/registry:/var/lib/registry"
|