mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 11:12:32 +00:00
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>
16 lines
371 B
Makefile
16 lines
371 B
Makefile
all: proxy
|
|
|
|
.PHONY: vendor
|
|
vendor:
|
|
mkdir -p ./vendor
|
|
cp -r ../go/vendor/* ./vendor/
|
|
|
|
proxy: Dockerfile main.go proxy.go vendor
|
|
docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t proxy:build .
|
|
docker run --rm proxy:build cat /go/bin/proxy > proxy
|
|
chmod 755 proxy
|
|
|
|
clean:
|
|
rm -rf proxy vendor
|
|
docker images -q proxy:build | xargs docker rmi -f || true
|