mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move proxy build into hack/make
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
94017da880
commit
86c8b8f1a0
9 changed files with 45 additions and 17 deletions
|
@ -177,13 +177,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
|||
--mount=type=bind,src=hack/dockerfile/install,target=/tmp/install \
|
||||
PREFIX=/build /tmp/install/install.sh containerd
|
||||
|
||||
FROM dev-base AS proxy
|
||||
ARG LIBNETWORK_COMMIT
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
--mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=bind,src=hack/dockerfile/install,target=/tmp/install \
|
||||
PREFIX=/build /tmp/install/install.sh proxy
|
||||
|
||||
FROM base AS golangci_lint
|
||||
ARG GOLANGCI_LINT_COMMIT
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
|
@ -318,7 +311,6 @@ COPY --from=runc /build/ /usr/local/bin/
|
|||
COPY --from=containerd /build/ /usr/local/bin/
|
||||
COPY --from=rootlesskit /build/ /usr/local/bin/
|
||||
COPY --from=vpnkit /build/ /usr/local/bin/
|
||||
COPY --from=proxy /build/ /usr/local/bin/
|
||||
ENV PATH=/usr/local/cli:$PATH
|
||||
ARG DOCKER_BUILDTAGS
|
||||
ENV DOCKER_BUILDTAGS="${DOCKER_BUILDTAGS}"
|
||||
|
@ -364,7 +356,6 @@ COPY --from=tini /build/ /usr/local/bin/
|
|||
COPY --from=runc /build/ /usr/local/bin/
|
||||
COPY --from=containerd /build/ /usr/local/bin/
|
||||
COPY --from=rootlesskit /build/ /usr/local/bin/
|
||||
COPY --from=proxy /build/ /usr/local/bin/
|
||||
COPY --from=vpnkit /build/ /usr/local/bin/
|
||||
WORKDIR /go/src/github.com/docker/docker
|
||||
|
||||
|
|
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -121,7 +121,7 @@ pipeline {
|
|||
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
||||
docker:${GIT_COMMIT} \
|
||||
hack/make.sh \
|
||||
dynbinary-daemon \
|
||||
dynbinary \
|
||||
test-docker-py
|
||||
'''
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ pipeline {
|
|||
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
||||
-e DOCKER_GRAPHDRIVER \
|
||||
docker:${GIT_COMMIT} \
|
||||
hack/make.sh binary-daemon
|
||||
hack/make.sh binary
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ pipeline {
|
|||
-e DOCKER_GRAPHDRIVER \
|
||||
docker:${GIT_COMMIT} \
|
||||
hack/make.sh \
|
||||
dynbinary-daemon
|
||||
dynbinary
|
||||
|
||||
# flaky + integration
|
||||
TEST_INTEGRATION_DEST=1 CONTAINER_NAME=${CONTAINER_NAME}-1 TEST_SKIP_INTEGRATION_CLI=1 run_tests test-integration-flaky &
|
||||
|
|
|
@ -8,8 +8,6 @@ binary_extension() {
|
|||
fi
|
||||
}
|
||||
|
||||
GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
|
||||
BINARY_SHORT_NAME='dockerd'
|
||||
BINARY_NAME="$BINARY_SHORT_NAME-$VERSION"
|
||||
BINARY_EXTENSION="$(binary_extension)"
|
||||
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
|
||||
|
|
|
@ -7,4 +7,5 @@ rm -rf "$DEST"
|
|||
DEST="${DEST}-daemon"
|
||||
ABS_DEST="${ABS_DEST}-daemon"
|
||||
. hack/make/binary-daemon
|
||||
. hack/make/binary-proxy
|
||||
)
|
||||
|
|
|
@ -14,7 +14,7 @@ copy_binaries() {
|
|||
return
|
||||
fi
|
||||
echo "Copying nested executables into $dir"
|
||||
for file in containerd containerd-shim containerd-shim-runc-v2 ctr runc docker-init docker-proxy rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh dockerd-rootless-setuptool.sh; do
|
||||
for file in containerd containerd-shim containerd-shim-runc-v2 ctr runc docker-init rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh dockerd-rootless-setuptool.sh; do
|
||||
cp -f "$(command -v "$file")" "$dir/"
|
||||
if [ "$hash" = "hash" ]; then
|
||||
hash_files "$dir/$file"
|
||||
|
@ -31,5 +31,11 @@ copy_binaries() {
|
|||
}
|
||||
|
||||
[ -z "$KEEPDEST" ] && rm -rf "$DEST"
|
||||
source "${MAKEDIR}/.binary"
|
||||
copy_binaries "$DEST" 'hash'
|
||||
|
||||
(
|
||||
GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
|
||||
BINARY_SHORT_NAME='dockerd'
|
||||
|
||||
source "${MAKEDIR}/.binary"
|
||||
copy_binaries "$DEST" 'hash'
|
||||
)
|
||||
|
|
10
hack/make/binary-proxy
Normal file
10
hack/make/binary-proxy
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
(
|
||||
GO_PACKAGE='github.com/docker/docker/libnetwork/cmd/proxy'
|
||||
BINARY_SHORT_NAME='docker-proxy'
|
||||
|
||||
source "${MAKEDIR}/.binary"
|
||||
)
|
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
rm -rf "$DEST"
|
||||
|
||||
# This script exists as backwards compatibility for CI
|
||||
(
|
||||
DEST="${DEST}-daemon"
|
||||
ABS_DEST="${ABS_DEST}-daemon"
|
||||
. hack/make/dynbinary-daemon
|
||||
. hack/make/dynbinary-proxy
|
||||
)
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
[ -z "$KEEPDEST" ] && rm -rf "$DEST"
|
||||
|
||||
(
|
||||
export IAMSTATIC='false'
|
||||
export LDFLAGS_STATIC_DOCKER=''
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/netgo /}") # disable netgo, since we don't need it for a dynamic binary
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/osusergo /}") # ditto for osusergo
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/static_build /}") # we're not building a "static" binary here
|
||||
|
||||
GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
|
||||
BINARY_SHORT_NAME='dockerd'
|
||||
source "${MAKEDIR}/.binary"
|
||||
)
|
||||
|
|
15
hack/make/dynbinary-proxy
Normal file
15
hack/make/dynbinary-proxy
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
(
|
||||
export IAMSTATIC='false'
|
||||
export LDFLAGS_STATIC_DOCKER=''
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/netgo /}") # disable netgo, since we don't need it for a dynamic binary
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/osusergo /}") # ditto for osusergo
|
||||
export BUILDFLAGS=("${BUILDFLAGS[@]/static_build /}") # we're not building a "static" binary here
|
||||
|
||||
GO_PACKAGE='github.com/docker/docker/libnetwork/cmd/proxy'
|
||||
BINARY_SHORT_NAME='docker-proxy'
|
||||
source "${MAKEDIR}/.binary"
|
||||
)
|
Loading…
Add table
Reference in a new issue