Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make win doesn't work #41862

Closed
chardch opened this issue Jan 7, 2021 · 0 comments · Fixed by #44546
Closed

make win doesn't work #41862

chardch opened this issue Jan 7, 2021 · 0 comments · Fixed by #44546

Comments

@chardch
Copy link

chardch commented Jan 7, 2021

Description

Unable to build dockerd.exe for windows using make win

Steps to reproduce the issue:

make win

Describe the results you received:

docker build  --build-arg=GO_VERSION  -f "Dockerfile" --target=final   -t "docker-dev:master" .
[+] Building 55.1s (66/66) FINISHED                                                                                                                                                                                 
 => [internal] load .dockerignore                                                                                                                                                                              0.0s
 => => transferring context: 87B                                                                                                                                                                               0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                           0.0s
 => => transferring dockerfile: 16.55kB                                                                                                                                                                        0.0s
 => resolve image config for docker.io/docker/dockerfile:1.1.7-experimental                                                                                                                                    0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1.1.7-experimental                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/golang:1.13.15-buster                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/debian:buster                                                                                                                                               0.2s
 => [internal] load metadata for docker.io/djs55/vpnkit:0.4.0                                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                              0.6s
 => => transferring context: 53.17MB                                                                                                                                                                           0.5s
 => CACHED [vpnkit 1/1] FROM docker.io/djs55/vpnkit:0.4.0                                                                                                                                                      0.0s
 => [base 1/3] FROM docker.io/library/golang:1.13.15-buster                                                                                                                                                    0.0s
 => [frozen-images 1/4] FROM docker.io/library/debian:buster@sha256:22d4552b9f96fd0ea943cb846d58b069d4df297673636055a3d984b3ccac6a28                                                                           0.0s
 => CACHED [frozen-images 2/4] RUN --mount=type=cache,sharing=locked,id=moby-frozen-images-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-frozen-images-aptcache,target=/var/cache/  0.0s
 => CACHED [frozen-images 3/4] COPY contrib/download-frozen-image-v2.sh /                                                                                                                                      0.0s
 => [frozen-images 4/4] RUN /download-frozen-image-v2.sh /build         buildpack-deps:buster@sha256:d0abb4b1e5c664828b93e8b6ac84d10bce45ee469999bef88304be04a2709491         busybox:latest@sha256:95cf004f  21.4s
 => CACHED [base 2/3] RUN echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache                                                                                           0.0s
 => CACHED [base 3/3] RUN sed -ri "s/(httpredir|deb).debian.org/${APT_MIRROR:-deb.debian.org}/g" /etc/apt/sources.list  && sed -ri "s/(security).debian.org/${APT_MIRROR:-security.debian.org}/g" /etc/apt/so  0.0s
 => CACHED [tini 1/2] RUN --mount=type=cache,sharing=locked,id=moby-tini-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-tini-aptcache,target=/var/cache/apt         apt-get update   0.0s
 => [tini 2/2] 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  4.4s
 => CACHED [runtime-dev-cross-false 1/1] RUN --mount=type=cache,sharing=locked,id=moby-cross-false-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-cross-false-aptcache,target=/var/  0.0s
 => [runc 1/1] 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 /tm  12.9s
 => CACHED [containerd 1/2] RUN --mount=type=cache,sharing=locked,id=moby-containerd-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-containerd-aptcache,target=/var/cache/apt        0.0s
 => [containerd 2/2] 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=/bui  49.5s
 => [rootlesskit 1/3] 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=/bu  11.7s
 => [vndr 1/1] 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  5.4s
 => [gotestsum 1/1] 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=/buil  10.1s
 => [proxy 1/1] 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 /t  11.8s
 => [golangci_lint 1/1] 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=/  20.5s
 => [tomlv 1/1] 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 /tm  5.1s
 => [dockercli 1/1] 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  3.0s
 => [shfmt 1/1] 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 /tm  8.8s
 => CACHED [registry 1/2] WORKDIR /go/src/github.com/docker/distribution                                                                                                                                       0.0s
 => CACHED [registry 2/2] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/         set -x         && git clone https://gi  0.0s
 => CACHED [criu 1/2] RUN --mount=type=cache,sharing=locked,id=moby-criu-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-criu-aptcache,target=/var/cache/apt         apt-get update   0.0s
 => CACHED [criu 2/2] RUN mkdir -p /usr/src/criu     && curl -sSL https://github.com/checkpoint-restore/criu/archive/v3.14.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1     && cd /usr/src/criu     0.0s
 => [rootlesskit 2/3] COPY ./contrib/dockerd-rootless.sh /build                                                                                                                                                0.1s
 => [rootlesskit 3/3] COPY ./contrib/dockerd-rootless-setuptool.sh /build                                                                                                                                      0.1s
 => CACHED [dev-systemd-false  1/26] RUN groupadd -r docker                                                                                                                                                    0.0s
 => CACHED [dev-systemd-false  2/26] RUN useradd --create-home --gid docker unprivilegeduser  && mkdir -p /home/unprivilegeduser/.local/share/docker  && chown -R unprivilegeduser /home/unprivilegeduser      0.0s
 => CACHED [dev-systemd-false  3/26] RUN ln -sfv /go/src/github.com/docker/docker/.bashrc ~/.bashrc                                                                                                            0.0s
 => CACHED [dev-systemd-false  4/26] RUN echo "source /usr/share/bash-completion/bash_completion" >> /etc/bash.bashrc                                                                                          0.0s
 => CACHED [dev-systemd-false  5/26] RUN ln -s /usr/local/completion/bash/docker /etc/bash_completion.d/docker                                                                                                 0.0s
 => CACHED [dev-systemd-false  6/26] RUN ldconfig                                                                                                                                                              0.0s
 => CACHED [dev-systemd-false  7/26] RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib,target=/var/lib/apt     --mount=type=cache,sharing=locked,id=moby-dev-aptcache,target=/var/cache/apt         ap  0.0s
 => CACHED [dev-systemd-false  8/26] RUN update-alternatives --set iptables  /usr/sbin/iptables-legacy  || true  && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy || true  && update-alterna  0.0s
 => CACHED [dev-systemd-false  9/26] RUN pip3 install yamllint==1.16.0                                                                                                                                         0.0s
 => CACHED [dev-systemd-false 10/26] COPY --from=dockercli     /build/ /usr/local/cli                                                                                                                          0.0s
 => CACHED [swagger 1/2] WORKDIR /go/src/github.com/go-swagger/go-swagger                                                                                                                                      0.0s
 => CACHED [swagger 2/2] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     --mount=type=tmpfs,target=/go/src/         set -x         && git clone https://git  0.0s
 => [dev-systemd-false 11/26] COPY --from=frozen-images /build/ /docker-frozen-images                                                                                                                          1.3s
 => [dev-systemd-false 12/26] COPY --from=swagger       /build/ /usr/local/bin/                                                                                                                                0.2s
 => [dev-systemd-false 13/26] COPY --from=tomlv         /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 14/26] COPY --from=tini          /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 15/26] COPY --from=registry      /build/ /usr/local/bin/                                                                                                                                0.2s
 => [dev-systemd-false 16/26] COPY --from=criu          /build/ /usr/local/                                                                                                                                    0.1s
 => [dev-systemd-false 17/26] COPY --from=vndr          /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 18/26] COPY --from=gotestsum     /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 19/26] COPY --from=golangci_lint /build/ /usr/local/bin/                                                                                                                                0.2s
 => [dev-systemd-false 20/26] COPY --from=shfmt         /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 21/26] COPY --from=runc          /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 22/26] COPY --from=containerd    /build/ /usr/local/bin/                                                                                                                                0.3s
 => [dev-systemd-false 23/26] COPY --from=rootlesskit   /build/ /usr/local/bin/                                                                                                                                0.2s
 => [dev-systemd-false 24/26] COPY --from=vpnkit        /vpnkit /usr/local/bin/vpnkit.x86_64                                                                                                                   0.2s
 => [dev-systemd-false 25/26] COPY --from=proxy         /build/ /usr/local/bin/                                                                                                                                0.1s
 => [dev-systemd-false 26/26] WORKDIR /go/src/github.com/docker/docker                                                                                                                                         0.0s
 => [final 1/1] COPY . /go/src/github.com/docker/docker                                                                                                                                                        0.7s
 => exporting to image                                                                                                                                                                                         2.2s
 => => exporting layers                                                                                                                                                                                        2.1s
 => => writing image sha256:328ce32e982ab1000c120537111d16f0cb09d92c0c2b2e1e6f382a17dfbd7dc4                                                                                                                   0.0s
 => => naming to docker.io/library/docker-dev:master                                                                                                                                                           0.0s
docker run --rm -i --privileged  -e DOCKER_CROSSPLATFORMS -e BUILD_APT_MIRROR -e BUILDFLAGS -e KEEPBUNDLE -e DOCKER_BUILD_ARGS -e DOCKER_BUILD_GOGC -e DOCKER_BUILD_OPTS -e DOCKER_BUILD_PKGS -e DOCKER_BUILDKIT -e DOCKER_BASH_COMPLETION_PATH -e DOCKER_CLI_PATH -e DOCKER_DEBUG -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT -e DOCKER_GRAPHDRIVER -e DOCKER_LDFLAGS -e DOCKER_PORT -e DOCKER_REMAP_ROOT -e DOCKER_ROOTLESS -e DOCKER_STORAGE_OPTS -e DOCKER_TEST_HOST -e DOCKER_USERLANDPROXY -e DOCKERD_ARGS -e TEST_FORCE_VALIDATE -e TEST_INTEGRATION_DIR -e TEST_SKIP_INTEGRATION -e TEST_SKIP_INTEGRATION_CLI -e TESTDEBUG -e TESTDIRS -e TESTFLAGS -e TESTFLAGS_INTEGRATION -e TESTFLAGS_INTEGRATION_CLI -e TEST_FILTER -e TIMEOUT -e VALIDATE_REPO -e VALIDATE_BRANCH -e VALIDATE_ORIGIN_BRANCH -e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY -e http_proxy -e https_proxy -e no_proxy -e VERSION -e PLATFORM -e DEFAULT_PRODUCT_LICENSE -e PRODUCT -v "/usr/local/google/home/chardch/go/src/github.com/moby/bundles:/go/src/github.com/docker/docker/bundles" -v "/usr/local/google/home/chardch/go/src/github.com/moby/.git:/go/src/github.com/docker/docker/.git" -v docker-dev-cache:/root/.cache    -t "docker-dev:master" DOCKER_CROSSPLATFORMS=windows/amd64 hack/make.sh cross
hack/dind: 40: exec: DOCKER_CROSSPLATFORMS=windows/amd64: not found
make: *** [Makefile:251: win] Error 127

Describe the results you expected:

The windows binaries to be built under bundles/cross/windows/amd64/
I can get this to work if I change this line https://github.com/moby/moby/blob/master/Makefile#L251 to set DOCKER_CROSSPLATFORMS before the docker command:
DOCKER_CROSSPLATFORMS=windows/amd64; $(DOCKER_RUN_DOCKER) hack/make.sh cross

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant