forked from jlhawn/dockramp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
26 lines (20 loc) · 763 Bytes
/
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
# Set an output prefix, which is the local directory if not specified
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
.PHONY: all clean image binaries
all: clean binaries
clean:
@echo "+ $@"
@rm -rf bundles
image:
@echo "+ $@"
@docker build -t docker-unit-build:${GIT_BRANCH} .
binaries: image
@echo "+ $@"
$(eval C_ID := $(shell docker create docker-unit-build:${GIT_BRANCH}))
@docker start -a ${C_ID}
@docker cp ${C_ID}:/bundles .
test: image
@echo "+ $@"
$(eval DOCKER_PATH := $(shell which docker))
@docker run -it --entrypoint make_tests.sh docker-unit-build:${GIT_BRANCH}
#@docker run -it --entrypoint make_tests.sh -v /var/run/docker.sock:/var/run/docker.sock -v ${DOCKER_PATH}:/bin/docker docker-unit-build:${GIT_BRANCH}