diff --git a/Makefile b/Makefile index b30da391..9d3b132c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary build-container docs build-local clean install install-binary install-completions shell test-integration vendor +.PHONY: all binary build-container docs docs-in-container build-local clean install install-binary install-completions shell test-integration vendor export GO15VENDOREXPERIMENT=1 @@ -65,7 +65,7 @@ endif # Note: Uses the -N -l go compiler options to disable compiler optimizations # and inlining. Using these build options allows you to subsequently # use source debugging tools like delve. -all: binary docs +all: binary docs-in-container # Build a container image (skopeobuild) that has everything we need to build. # Then do the build and the output (skopeo) should appear in current dir @@ -94,6 +94,11 @@ docs/%.1: docs/%.1.md docs: $(MANPAGES_MD:%.md=%) +docs-in-container: + ${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f Dockerfile.build -t skopeobuildimage . + ${CONTAINER_RUNTIME} run --rm --security-opt label=disable -v $$(pwd):/src/github.com/containers/skopeo \ + skopeobuildimage make docs $(if $(DEBUG),DEBUG=$(DEBUG)) BUILDTAGS='$(BUILDTAGS)' + clean: rm -f skopeo docs/*.1