-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
32 lines (31 loc) · 975 Bytes
/
docker-compose.yml
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
# V2, for supporting the build/image instead of prebuilt images
# https://docs.docker.com/compose/compose-file/#build
version: "2"
services:
target:
build: infrastructure/containers/target/
image: dustinvenegas/ubuntu-sshd:latest
networks:
- private
expose:
- "22"
privileged: true
restart: always
volumes:
- ~/.ssh/ansible_docker_id_rsa.pub:/root/.ssh/authorized_keys:ro
ansible:
build: infrastructure/containers/ansible/
depends_on:
- "target"
environment:
- ANSIBLE_HOST_KEY_CHECKING=False
image: dustinvenegas/ansible-via-docker-poc:latest
networks:
- private
volumes:
- .:/ansible/playbooks
- ~/.ssh/ansible_docker_id_rsa:/ansible/staging/.ssh/id_rsa:ro
- ~/.ssh/ansible_docker_id_rsa.pub:/ansible/staging/.ssh/id_rsa.pub:ro
command: [ "--inventory=inventory.ini", "--limit=docker_compose_target", "playbook.yml", "-vvvv"]
networks:
private: {}