1 all: api-image doc-image workbench-image warehouse-image sso-image
4 -rm *-image */generated/*
6 # ============================================================
7 # Dependencies for */generated files which are prerequisites
8 # for building docker images.
10 BASE_DEPS = base/Dockerfile $(BASE_GENERATED)
12 API_DEPS = api/Dockerfile $(API_GENERATED)
14 DOC_DEPS = doc/Dockerfile doc/apache2_vhost
16 WORKBENCH_DEPS = workbench/Dockerfile \
17 workbench/passenger.conf \
18 $(WORKBENCH_GENERATED)
20 WAREHOUSE_DEPS = warehouse/Dockerfile \
21 warehouse/supervisor.conf \
22 $(WAREHOUSE_GENERATED)
24 SSO_DEPS = sso/passenger.conf $(SSO_GENERATED)
26 BASE_GENERATED = base/generated
29 api/generated/apache2_vhost \
30 api/generated/config_databases.sh \
31 api/generated/database.yml \
32 api/generated/omniauth.rb \
33 api/generated/production.rb \
34 api/generated/secret_token.rb \
35 api/generated/superuser_token
38 api/apache2_vhost.in \
39 api/config_databases.sh.in \
42 api/production.rb.in \
43 api/secret_token.rb.in \
44 api/superuser_token.in
46 WORKBENCH_GENERATED = \
47 workbench/generated/apache2_vhost \
48 workbench/generated/production.rb \
49 workbench/generated/secret_token.rb
51 WORKBENCH_GENERATED_IN = \
52 workbench/apache2_vhost.in \
53 workbench/production.rb.in \
54 workbench/secret_token.rb.in
56 WAREHOUSE_GENERATED = warehouse/generated/warehouse.conf
58 WAREHOUSE_GENERATED_IN = warehouse/warehouse.conf.in
61 sso/generated/apache2_vhost \
62 sso/generated/seeds.rb \
63 sso/generated/secret_token.rb
66 sso/apache2_vhost.in \
68 sso/secret_token.rb.in
70 $(BASE_GENERATED): config.yml
73 $(API_GENERATED): config.yml $(API_GENERATED_IN)
76 $(WORKBENCH_GENERATED): config.yml $(WORKBENCH_GENERATED_IN)
79 $(WAREHOUSE_GENERATED): config.yml $(WAREHOUSE_GENERATED_IN)
82 $(SSO_GENERATED): config.yml $(SSO_GENERATED_IN)
85 # ============================================================
86 # The main Arvados servers: api, doc, workbench, warehouse
88 api-image: passenger-image $(API_DEPS)
89 mkdir -p api/generated
90 tar -c -z -f api/generated/api.tar.gz -C ../services api
91 ./docker_build -t arvados/api api
92 echo -n "Built at $(date)" > api-image
94 doc-image: base-image $(DOC_DEPS)
95 mkdir -p doc/generated
96 tar -c -z -f doc/generated/doc.tar.gz -C .. doc
97 ./docker_build -t arvados/doc doc
98 echo -n "Built at $(date)" > doc-image
100 workbench-image: passenger-image $(WORKBENCH_DEPS)
101 mkdir -p workbench/generated
102 tar -c -z -f workbench/generated/workbench.tar.gz -C ../apps workbench
103 ./docker_build -t arvados/workbench workbench
104 echo -n "Built at $(date)" > workbench-image
106 warehouse-image: base-image $(WAREHOUSE_DEPS)
107 ./docker_build -t arvados/warehouse warehouse
108 echo -n "Built at $(date)" > warehouse-image
110 sso-image: passenger-image $(SSO_DEPS)
111 ./docker_build -t arvados/sso sso
112 echo -n "Built at $(date)" > sso-image
114 # ============================================================
115 # The arvados/base image is the base Debian image plus packages
116 # that are dependencies for every Arvados service.
118 passenger-image: base-image
119 ./docker_build -t arvados/passenger passenger
120 echo -n "Built at $(date)" > passenger-image
122 base-image: debian-image $(BASE_DEPS)
123 ./docker_build -t arvados/base base
124 echo -n "Built at $(date)" > base-image
127 ./mkimage-debootstrap.sh arvados/debian wheezy http://debian.lcs.mit.edu/debian/
128 echo -n "Built at $(date)" > debian-image