Skip to content

Commit

Permalink
Merge pull request #554 from thaJeztah/fix_docker_proxy_build
Browse files Browse the repository at this point in the history
Fix build-script for docker-proxy (after libnetwork integration) and update to Go 1.16.5
  • Loading branch information
fredericdalleau authored Jul 2, 2021
2 parents dc6d0c5 + 09541b5 commit 4cd3a7e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILDTIME=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 n
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
DEFAULT_PRODUCT_LICENSE:=Community Engine
DOCKER_GITCOMMIT:=abcdefg
GO_VERSION:=1.13.15
GO_VERSION:=1.16.5
PLATFORM=Docker Engine - Community
SHELL:=/bin/bash
VERSION?=0.0.1-dev
Expand Down
3 changes: 1 addition & 2 deletions deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ override_dh_auto_build:
# Build the daemon and dependencies
cd engine && DOCKER_GITCOMMIT=$(ENGINE_GITCOMMIT) PRODUCT=docker ./hack/make.sh dynbinary
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh proxy dynamic
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh rootlesskit dynamic
# Build the CLI
cd /go/src/github.com/docker/cli && VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) LDFLAGS='' GO_LINKMODE=dynamic ./scripts/build/binary && DISABLE_WARN_OUTSIDE_CONTAINER=1 LDFLAGS='' make manpages
Expand Down Expand Up @@ -59,7 +58,7 @@ override_dh_auto_install:
install -D -m 0644 engine/contrib/init/systemd/docker.service debian/docker-ce/lib/systemd/system/docker.service
install -D -m 0644 engine/contrib/init/systemd/docker.socket debian/docker-ce/lib/systemd/system/docker.socket
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd
install -D -m 0755 /usr/local/bin/docker-proxy debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/docker-proxy) debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init

# docker-scan-plugin install
Expand Down
14 changes: 4 additions & 10 deletions rpm/SPECS/docker-ce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ BuildRequires: device-mapper-devel
BuildRequires: gcc
BuildRequires: git
BuildRequires: glibc-static
BuildRequires: libarchive
BuildRequires: libseccomp-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
Expand Down Expand Up @@ -79,9 +80,7 @@ mkdir -p /go/src/github.com/docker
ln -s ${RPM_BUILD_DIR}/src/engine /go/src/github.com/docker/docker

pushd ${RPM_BUILD_DIR}/src/engine
for component in tini "proxy dynamic";do
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
done
TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
VERSION=%{_origversion} PRODUCT=docker hack/make.sh dynbinary
popd

Expand All @@ -90,14 +89,9 @@ ver="$(engine/bundles/dynbinary-daemon/dockerd --version)"; \
test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_engine}" && echo "PASS: daemon version OK" || echo "FAIL: daemon version ($ver) did not match"

%install
# install daemon binary
install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) ${RPM_BUILD_ROOT}%{_bindir}/dockerd

# install proxy
install -D -p -m 0755 /usr/local/bin/docker-proxy ${RPM_BUILD_ROOT}%{_bindir}/docker-proxy

# install tini
install -D -p -m 755 /usr/local/bin/docker-init ${RPM_BUILD_ROOT}%{_bindir}/docker-init
install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/docker-proxy) ${RPM_BUILD_ROOT}%{_bindir}/docker-proxy
install -D -p -m 0755 /usr/local/bin/docker-init ${RPM_BUILD_ROOT}%{_bindir}/docker-init

# install systemd scripts
install -D -m 0644 engine/contrib/init/systemd/docker.service ${RPM_BUILD_ROOT}%{_unitdir}/docker.service
Expand Down
3 changes: 2 additions & 1 deletion static/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ cross-win: cross-win-engine cross-win-plugins
cd $(CLI_DIR) && VERSION=$(GEN_STATIC_VER) docker buildx bake --set binary.platform=windows/amd64 binary
mkdir -p build/win/amd64/docker
cp $(CLI_DIR)/build/docker-windows-amd64.exe build/win/amd64/docker/docker.exe
cp $(ENGINE_DIR)/bundles/cross/windows/amd64/dockerd-$(GEN_STATIC_VER).exe build/win/amd64/docker/dockerd.exe
cp $(ENGINE_DIR)/bundles/cross/windows/amd64-daemon/dockerd-$(GEN_STATIC_VER).exe build/win/amd64/docker/dockerd.exe
cp $(ENGINE_DIR)/bundles/cross/windows/amd64-daemon/docker-proxy-$(GEN_STATIC_VER).exe build/win/amd64/docker/dockerd.exe
docker run --rm -v $(CURDIR)/build/win/amd64:/v -w /v alpine sh -c 'apk update&&apk add zip&&zip -r docker-$(GEN_STATIC_VER).zip docker'
$(CHOWN) -R $(shell id -u):$(shell id -g) build

Expand Down

0 comments on commit 4cd3a7e

Please sign in to comment.