1 all: api-image docserver-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 API_DEPS = api/Dockerfile $(API_GENERATED)
12 DOCSERVER_DEPS = docserver/Dockerfile docserver/apache2_vhost
14 WORKBENCH_DEPS = workbench/Dockerfile \
15 workbench/passenger.conf \
16 $(WORKBENCH_GENERATED)
18 WAREHOUSE_DEPS = warehouse/Dockerfile \
19 warehouse/supervisor.conf \
20 $(WAREHOUSE_GENERATED)
22 SSO_DEPS = sso/passenger.conf $(SSO_GENERATED)
25 api/generated/apache2_vhost \
26 api/generated/config_databases.sh \
27 api/generated/database.yml \
28 api/generated/omniauth.rb \
29 api/generated/production.rb \
30 api/generated/secret_token.rb
33 api/apache2_vhost.in \
34 api/config_databases.sh.in \
37 api/production.rb.in \
38 api/secret_token.rb.in
40 WORKBENCH_GENERATED = \
41 workbench/generated/apache2_vhost \
42 workbench/generated/production.rb \
43 workbench/generated/secret_token.rb
45 WORKBENCH_GENERATED_IN = \
46 workbench/apache2_vhost.in \
47 workbench/production.rb.in \
48 workbench/secret_token.rb.in
50 WAREHOUSE_GENERATED = warehouse/generated/warehouse.conf
52 WAREHOUSE_GENERATED_IN = warehouse/warehouse.conf.in
55 sso/generated/apache2_vhost \
56 sso/generated/seeds.rb \
57 sso/generated/secret_token.rb
60 sso/apache2_vhost.in \
62 sso/secret_token.rb.in
64 $(API_GENERATED): $(API_GENERATED_IN)
67 $(WORKBENCH_GENERATED): $(WORKBENCH_GENERATED_IN)
70 $(WAREHOUSE_GENERATED): $(WAREHOUSE_GENERATED_IN)
73 $(SSO_GENERATED): $(SSO_GENERATED_IN)
76 # ============================================================
77 # The main Arvados servers: api, docserver, workbench, warehouse
79 api-image: passenger-image $(API_DEPS)
80 mkdir -p api/generated
81 tar -c -z -f api/generated/api.tar.gz -C ../services api
82 ./docker_build -t arvados/api api
83 echo -n "Built at $(date)" > api-image
85 docserver-image: base-image $(DOCSERVER_DEPS)
86 mkdir -p docserver/generated
87 tar -c -z -f docserver/generated/doc.tar.gz -C .. doc
88 ./docker_build -t arvados/docserver docserver
89 echo -n "Built at $(date)" > docserver-image
91 workbench-image: passenger-image $(WORKBENCH_DEPS)
92 mkdir -p workbench/generated
93 tar -c -z -f workbench/generated/workbench.tar.gz -C ../apps workbench
94 ./docker_build -t arvados/workbench workbench
95 echo -n "Built at $(date)" > workbench-image
97 warehouse-image: base-image $(WAREHOUSE_DEPS)
98 ./docker_build -t arvados/warehouse warehouse
99 echo -n "Built at $(date)" > warehouse-image
101 sso-image: passenger-image $(SSO_DEPS)
102 ./docker_build -t arvados/sso sso
103 echo -n "Built at $(date)" > sso-image
105 # ============================================================
106 # The arvados/base image is the base Debian image plus packages
107 # that are dependencies for every Arvados service.
109 passenger-image: base-image
110 ./docker_build -t arvados/passenger passenger
111 echo -n "Built at $(date)" > passenger-image
113 base-image: debian-image
114 ./docker_build -t arvados/base base
115 echo -n "Built at $(date)" > base-image
118 ./mkimage-debootstrap.sh arvados/debian wheezy http://debian.lcs.mit.edu/debian/
119 echo -n "Built at $(date)" > debian-image