fix(Makefile): delete build container and container runtime

changes:
- delete build container after any container step
- define container runtime over variable
This commit is contained in:
Markus Pesch 2019-06-16 23:39:07 +02:00
parent 64590c1194
commit b2bd4f8fe6
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -10,6 +10,8 @@ GID?=$(shell id --group)
# value is taken. # value is taken.
VERSION:=$(or ${TRAVIS_TAG}, ${TRAVIS_TAG}, $(shell git rev-parse --short HEAD)-git) VERSION:=$(or ${TRAVIS_TAG}, ${TRAVIS_TAG}, $(shell git rev-parse --short HEAD)-git)
CONTAINER_RUNTIME?=$(shell which docker)
GOARCH?=amd64 GOARCH?=amd64
GOOS?=linux GOOS?=linux
@ -33,8 +35,9 @@ container-test:
$(MAKE) container-run COMMAND=test $(MAKE) container-run COMMAND=test
container-run: container-run:
docker run \ ${CONTAINER_RUNTIME} run \
--volume ${PWD}:/workspace \ --volume ${PWD}:/workspace \
--rm \
volkerraschek/build-image:latest\ volkerraschek/build-image:latest\
make ${COMMAND} UID=${UID} GID=${GID} VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH} make ${COMMAND} UID=${UID} GID=${GID} VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH}