github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/hack/make/binary-daemon (about) 1 #!/usr/bin/env bash 2 set -e 3 4 copy_binaries() { 5 local dir="$1" 6 7 # Add nested executables to bundle dir so we have complete set of 8 # them available, but only if the native OS/ARCH is the same as the 9 # OS/ARCH of the build target 10 if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then 11 return 12 fi 13 if [ ! -x /usr/local/bin/runc ]; then 14 return 15 fi 16 echo "Copying nested executables into $dir" 17 for file in containerd containerd-shim-runc-v2 ctr runc docker-init rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh dockerd-rootless-setuptool.sh; do 18 cp -f "$(command -v "$file")" "$dir/" 19 done 20 21 # vpnkit is available for x86_64 and aarch64 22 if command -v "vpnkit.$(uname -m)" 2>&1 > /dev/null; then 23 cp -f "$(command -v "vpnkit.$(uname -m)")" "$dir/vpnkit" 24 fi 25 } 26 27 [ -z "$KEEPDEST" ] && rm -rf "$DEST" 28 29 ( 30 GO_PACKAGE='github.com/docker/docker/cmd/dockerd' 31 BINARY_NAME='dockerd' 32 33 source "${MAKEDIR}/.binary" 34 copy_binaries "$DEST" 35 )