From b2bd4f8fe61b98d32eed9e94ab925e66708643b2 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 16 Jun 2019 23:39:07 +0200 Subject: [PATCH] fix(Makefile): delete build container and container runtime changes: - delete build container after any container step - define container runtime over variable --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index af244dd..ea81ba6 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ GID?=$(shell id --group) # value is taken. VERSION:=$(or ${TRAVIS_TAG}, ${TRAVIS_TAG}, $(shell git rev-parse --short HEAD)-git) +CONTAINER_RUNTIME?=$(shell which docker) + GOARCH?=amd64 GOOS?=linux @@ -33,8 +35,9 @@ container-test: $(MAKE) container-run COMMAND=test container-run: - docker run \ + ${CONTAINER_RUNTIME} run \ --volume ${PWD}:/workspace \ + --rm \ volkerraschek/build-image:latest\ make ${COMMAND} UID=${UID} GID=${GID} VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH}