@@ -4,6 +4,7 @@ CLI_DIR=$(realpath $(CURDIR)/../src/github.com/docker/cli)
4
4
ENGINE_DIR =$(realpath $(CURDIR ) /../src/github.com/docker/docker)
5
5
GEN_STATIC_VER =$(shell ./gen-static-ver $(CLI_DIR ) $(VERSION ) )
6
6
HASH_CMD =docker run -v $(CURDIR ) :/sum -w /sum debian:jessie bash hash_files
7
+ LDD_RUN =ldd >/dev/null 2>/dev/null
7
8
DIR_TO_HASH: =build/linux
8
9
GO_VERSION =$(shell grep "ARG GO_VERSION" $(CLI_DIR ) /dockerfiles/Dockerfile.dev | awk -F'=' '{print $$2}')
9
10
DOCKER_CLI_GOLANG_IMG =golang:$(GO_VERSION )
@@ -26,6 +27,7 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an
26
27
mkdir -p build/linux/docker
27
28
cp $(CLI_DIR ) /build/docker build/linux/docker/
28
29
for f in dockerd containerd ctr containerd-shim containerd-shim-runc-v2 docker-init docker-proxy runc; do \
30
+ if $( LDD_RUN) $( ENGINE_DIR) /bundles/binary-daemon/$$ f; then echo " $$ f is not static, exiting..." ; exit 1; fi ; \
29
31
cp -L $(ENGINE_DIR ) /bundles/binary-daemon/$$ f build/linux/docker/$$ f; \
30
32
done
31
33
tar -C build/linux -c -z -f build/linux/docker-$(GEN_STATIC_VER ) .tgz docker
@@ -34,6 +36,7 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an
34
36
mkdir -p build/linux/docker-rootless-extras
35
37
for f in rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh dockerd-rootless-setuptool.sh vpnkit; do \
36
38
if [ -f $(ENGINE_DIR)/bundles/binary-daemon/$$f ]; then \
39
+ if $(LDD_RUN) $(ENGINE_DIR)/bundles/binary-daemon/$$f; then echo "$$f is not static, exiting..."; exit 1; fi; \
37
40
cp -L $(ENGINE_DIR)/bundles/binary-daemon/$$f build/linux/docker-rootless-extras/$$f; \
38
41
fi \
39
42
done
0 commit comments