Files
linuxkit/alpine/packages/diagnostics/Makefile
Ian Campbell 5165a6c795 Add || true to the docker rmi invocations in the clean target
Linux xargs calls the command with no arguments if it gets no inputs, which
`docker rmi` complains about. It provides -r / --no-run-if-empty to prevent
this but unfortunately this isn't supported on OSX.

Ignore errors from `docker rmi` so that `make clean` will keep going and clean
up later stuff.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-06-08 13:59:47 +01:00

16 lines
451 B
Makefile

all: diagnostics-server
.PHONY: vendor
vendor:
mkdir -p ./vendor
cp -r ../go/vendor/* ./vendor/
diagnostics-server: Dockerfile main.go vendor
docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t diagnostics:build .
docker run --rm diagnostics:build cat /go/bin/diagnostics > diagnostics-server
chmod 755 diagnostics-server
clean:
rm -rf diagnostics-server vendor
docker images -q diagnostics:build | xargs docker rmi -f || true