Merge pull request #48132 from robmry/bind_socket_for_docker_proxy

Create docker-proxy TCP/UDP listener sockets in the daemon
This commit is contained in:
Sebastiaan van Stijn
2024-08-08 20:30:58 +02:00
committed by GitHub
25 changed files with 1155 additions and 425 deletions

View File

@@ -27,7 +27,5 @@ install_rootlesskit_dynamic() {
_install_rootlesskit() (
echo "Install rootlesskit version ${ROOTLESSKIT_VERSION}"
for f in rootlesskit rootlesskit-docker-proxy; do
GOBIN="${PREFIX}" GO111MODULE=on go install ${BUILD_MODE} -ldflags="$ROOTLESSKIT_LDFLAGS" "github.com/rootless-containers/rootlesskit/v2/cmd/${f}@${ROOTLESSKIT_VERSION}"
done
GOBIN="${PREFIX}" GO111MODULE=on go install ${BUILD_MODE} -ldflags="$ROOTLESSKIT_LDFLAGS" "github.com/rootless-containers/rootlesskit/v2/cmd/rootlesskit@${ROOTLESSKIT_VERSION}"
)

View File

@@ -14,7 +14,7 @@ copy_binaries() {
return
fi
echo "Copying nested executables into $dir"
for file in containerd containerd-shim-runc-v2 ctr runc docker-init rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh dockerd-rootless-setuptool.sh; do
for file in containerd containerd-shim-runc-v2 ctr runc docker-init rootlesskit dockerd-rootless.sh dockerd-rootless-setuptool.sh; do
cp -f "$(command -v "$file")" "$dir/"
done
# vpnkit might not be available for the target platform, see vpnkit stage in

View File

@@ -2,7 +2,8 @@
set -e
(
# docker-proxy is Linux only
[ "$(go env GOOS)" != 'linux' ] || (
export CGO_ENABLED=0
DOCKER_STATIC=1

View File

@@ -2,7 +2,8 @@
set -e
(
# docker-proxy is Linux only
[ "$(go env GOOS)" != 'linux' ] || (
export LDFLAGS_STATIC=''
export BUILDFLAGS=("${BUILDFLAGS[@]/netgo /}") # disable netgo, since we don't need it for a dynamic binary
export BUILDFLAGS=("${BUILDFLAGS[@]/osusergo /}") # ditto for osusergo

View File

@@ -15,7 +15,6 @@ source "${MAKEDIR}/.install"
install_binary "${DEST}/docker-proxy"
install_binary "${DEST}/docker-init"
install_binary "${DEST}/rootlesskit"
install_binary "${DEST}/rootlesskit-docker-proxy"
install_binary "${DEST}/dockerd-rootless.sh"
install_binary "${DEST}/dockerd-rootless-setuptool.sh"
if [ -f "${DEST}/vpnkit" ]; then