forked from StackStorm/st2-dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (30 loc) · 1.26 KB
/
Makefile
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
ST2_VERSION ?= 3.3dev
DOCKER_TAG ?= ${ST2_VERSION}
SHELL := /bin/bash
# Build all required images (st2 base image plus st2 components)
.PHONY: build
build:
@docker build \
--pull \
--no-cache \
--build-arg ST2_VERSION=${ST2_VERSION} \
-t stackstorm/st2:${DOCKER_TAG} base/
@echo -e "\033[32mSuccessfully built \033[1mstackstorm/st2:${DOCKER_TAG}\033[0m\033[32m common Docker image with StackStorm version \033[1m${ST2_VERSION}\033[0m"
@set -e; \
for component in st2*; do \
docker build \
--no-cache \
--build-arg ST2_VERSION=${ST2_VERSION} \
--tag stackstorm/$$component:${DOCKER_TAG} \
$$component/; \
echo -e "\033[32mSuccessfully built \033[1mstackstorm/$$component:${DOCKER_TAG}\033[0m\033[32m Docker image for StackStorm version \033[1m${ST2_VERSION}\033[0m"; \
done
.PHONY: push
push:
docker push stackstorm/st2:${DOCKER_TAG};
@echo -e "\033[32mSuccessfully pushed \033[1mstackstorm/st2:${DOCKER_TAG}\033[0m\033[32m Docker image for StackStorm version \033[1m${ST2_VERSION}\033[0m";
@set -e; \
for component in st2*; do \
docker push stackstorm/$$component:${DOCKER_TAG}; \
echo -e "\033[32mSuccessfully pushed \033[1mstackstorm/$$component:${DOCKER_TAG}\033[0m\033[32m Docker image for StackStorm version \033[1m${ST2_VERSION}\033[0m"; \
done