-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 1.18 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: '3'
volumes:
bin:
secrets:
cookbooks:
config:
services:
amazonlinux:
build:
context: .
dockerfile: Dockerfile-AmazonLinux
image: trr/amazonlinux
chef_data:
build:
context: .
dockerfile: Dockerfile-ChefCookbooks
depends_on:
- amazonlinux
volumes:
- cookbooks:/var/chef/cookbooks
- config:/var/chef/config
command: /bin/true
# Attach the image containing the Chef installation
chef:
build:
context: .
dockerfile: Dockerfile-Chef
depends_on:
- amazonlinux
volumes:
- bin:/opt/chef
# Override default command to use this container as a volume container
command: /bin/true
# Build the application container using Chef and the cookbooks on the attached volumes
tabula_rasa:
image: trr/amazonlinux:latest
depends_on:
- amazonlinux
- chef
- chef_data
privileged: true
environment:
PATH: "/opt/chef/bin:$PATH"
volumes:
- cookbooks:/var/chef/cookbooks
- config:/var/chef/config
- bin:/opt/chef
entrypoint: "/opt/chef/bin/chef-client"
command: "-c /var/chef/config/chef-zero.rb -z -j /var/chef/config/config.json"