Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Commit ef056f0

Browse files
committed
Build Windows CLI ourselves because ??????????????????????????????????
... and a happy new year Signed-off-by: Joffrey F <[email protected]>
1 parent c0c0435 commit ef056f0

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Dockerfile.windows

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
FROM dockercore/golang-cross:latest as cli_build
2+
3+
ARG DOCKER_VERSION
4+
ARG DOCKER_CLI_COMMIT
5+
RUN mkdir -p /go/src/github.com/docker/cli
6+
WORKDIR /go/src/github.com/docker/cli
7+
RUN git clone https://github.com/docker/cli.git . && git checkout $DOCKER_CLI_COMMIT
8+
RUN VERSION=$DOCKER_VERSION ./scripts/build/windows
9+
110
FROM debian:jessie
211

312
ENV DEBIAN_FRONTEND noninteractive
@@ -32,10 +41,7 @@ RUN mkdir /bundle
3241

3342
WORKDIR /bundle
3443

35-
RUN curl -fsSL -o dockerbins.zip "https://download.docker.com/win/static/${DOCKER_RELEASE_STAGE}/x86_64/docker-${DOCKER_VERSION}.zip" && \
36-
unzip dockerbins.zip && \
37-
mv docker/docker.exe . && \
38-
rm -r docker/ dockerbins.zip
44+
COPY --from=cli_build /go/src/github.com/docker/cli/build/docker-windows-amd64 ./docker.exe
3945

4046
RUN curl -fsSL -o docker-machine.exe "https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine-Windows-x86_64.exe"
4147

script/build-windows

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ docker build \
99
--build-arg DOCKER_RELEASE_STAGE="${DOCKER_RELEASE_STAGE}" \
1010
--build-arg INSTALLER_VERSION="${INSTALLER_VERSION}" \
1111
--build-arg DOCKER_VERSION="${DOCKER_VERSION}" \
12+
--build-arg DOCKER_CLI_COMMIT="${DOCKER_CLI_COMMIT}" \
1213
--build-arg DOCKER_COMPOSE_VERSION="${DOCKER_COMPOSE_VERSION}" \
1314
--build-arg DOCKER_MACHINE_VERSION="${DOCKER_MACHINE_VERSION}" \
1415
--build-arg KITEMATIC_VERSION="${KITEMATIC_VERSION}" \

versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
DOCKER_RELEASE_STAGE=stable
22
INSTALLER_VERSION=17.12.0-ce
33
DOCKER_VERSION=17.12.0-ce
4+
DOCKER_CLI_COMMIT=ace5417954ec908d862d59e992c8d77685366eab
45
DOCKER_COMPOSE_VERSION=1.18.0
56
DOCKER_MACHINE_VERSION=0.13.0
67
KITEMATIC_VERSION=0.17.2

0 commit comments

Comments
 (0)