From 1196ccb93727a2ad2bdf7bd9961955bcb36d73be Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Wed, 27 Dec 2017 18:07:44 -0800 Subject: [PATCH 1/5] Docker on CircleCI doesn't support muti-stage builds Signed-off-by: Joffrey F --- Dockerfile.windows | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index b77e5bb2..ffeeaced 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -1,19 +1,11 @@ -FROM dockercore/golang-cross:latest as cli_build - -ARG DOCKER_VERSION -ARG DOCKER_CLI_COMMIT -RUN mkdir -p /go/src/github.com/docker/cli -WORKDIR /go/src/github.com/docker/cli -RUN git clone https://github.com/docker/cli.git . && git checkout $DOCKER_CLI_COMMIT -RUN VERSION=$DOCKER_VERSION ./scripts/build/windows - -FROM debian:jessie +FROM dockercore/golang-cross:latest ENV DEBIAN_FRONTEND noninteractive ARG DOCKER_RELEASE_STAGE ARG INSTALLER_VERSION ARG DOCKER_VERSION +ARG DOCKER_CLI_COMMIT ARG DOCKER_COMPOSE_VERSION ARG DOCKER_MACHINE_VERSION ARG KITEMATIC_VERSION @@ -21,17 +13,22 @@ ARG VBOX_VERSION ARG VBOX_REV ARG MIXPANEL_TOKEN +RUN mkdir -p /go/src/github.com/docker/cli +WORKDIR /go/src/github.com/docker/cli +RUN git clone https://github.com/docker/cli.git . && git checkout $DOCKER_CLI_COMMIT +RUN VERSION=$DOCKER_VERSION ./scripts/build/windows + RUN dpkg --add-architecture i386 -RUN sed -i "s/main/main contrib non-free/" etc/apt/sources.list +RUN sed -i "s/main/main contrib non-free/" /etc/apt/sources.list RUN apt-get update && apt-get install -yq wine curl unrar unzip # innosetup -RUN mkdir innosetup && \ - cd innosetup && \ +RUN mkdir /innosetup && \ + cd /innosetup && \ curl -fsSL -o innounp045.rar "https://downloads.sourceforge.net/project/innounp/innounp/innounp%200.45/innounp045.rar?r=&ts=1439566551&use_mirror=skylineservers" && \ unrar e innounp045.rar -RUN cd innosetup && \ +RUN cd /innosetup && \ curl -fsSL -o is-unicode.exe http://files.jrsoftware.org/is/5/isetup-5.5.8-unicode.exe && \ wine "./innounp.exe" -e "is-unicode.exe" @@ -41,7 +38,7 @@ RUN mkdir /bundle WORKDIR /bundle -COPY --from=cli_build /go/src/github.com/docker/cli/build/docker-windows-amd64 ./docker.exe +RUN cp /go/src/github.com/docker/cli/build/docker-windows-amd64 docker.exe RUN curl -fsSL -o docker-machine.exe "https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine-Windows-x86_64.exe" From add8ac23456c56b9e0a2dc6c15e815afe5da5238 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Wed, 27 Dec 2017 19:13:15 -0800 Subject: [PATCH 2/5] Use CLI source from the docker-ce repo Signed-off-by: Joffrey F --- Dockerfile.windows | 17 ++++++++++++----- versions | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index ffeeaced..a160feea 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -13,11 +13,6 @@ ARG VBOX_VERSION ARG VBOX_REV ARG MIXPANEL_TOKEN -RUN mkdir -p /go/src/github.com/docker/cli -WORKDIR /go/src/github.com/docker/cli -RUN git clone https://github.com/docker/cli.git . && git checkout $DOCKER_CLI_COMMIT -RUN VERSION=$DOCKER_VERSION ./scripts/build/windows - RUN dpkg --add-architecture i386 RUN sed -i "s/main/main contrib non-free/" /etc/apt/sources.list RUN apt-get update && apt-get install -yq wine curl unrar unzip @@ -34,6 +29,18 @@ RUN cd /innosetup && \ ENV GIT_VERSION 2.9.0 +# Build CLI binary +RUN mkdir -p /go/src/github.com/docker/ + +RUN git clone https://github.com/docker/docker-ce.git /docker-ce && \ + cd /docker-ce && \ + git checkout $DOCKER_CLI_COMMIT && \ + cp -R components/cli /go/src/github.com/docker/ + +WORKDIR /go/src/github.com/docker/cli +RUN VERSION=$DOCKER_VERSION GITCOMMIT=$(echo $DOCKER_CLI_COMMIT | cut -c 1-7) ./scripts/build/windows + +# Assemble bundle RUN mkdir /bundle WORKDIR /bundle diff --git a/versions b/versions index ac93f7e6..04e86a52 100644 --- a/versions +++ b/versions @@ -1,7 +1,7 @@ DOCKER_RELEASE_STAGE=stable INSTALLER_VERSION=17.12.0-ce DOCKER_VERSION=17.12.0-ce -DOCKER_CLI_COMMIT=ace5417954ec908d862d59e992c8d77685366eab +DOCKER_CLI_COMMIT=c97c6d62c26c1da407e3086f0b5d3d866ed308bc DOCKER_COMPOSE_VERSION=1.18.0 DOCKER_MACHINE_VERSION=0.13.0 KITEMATIC_VERSION=0.17.2 From 7c3429e15325c62fd4bb1a0b65779d152e2ecee6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 28 Dec 2017 11:13:22 +0100 Subject: [PATCH 3/5] Don't start container before copy `docker cp` does not require the container to be running, so just _create_ the container instead of running it. Signed-off-by: Sebastiaan van Stijn --- script/build-osx | 2 +- script/build-windows | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/build-osx b/script/build-osx index e1d30f49..d9f0e8c4 100755 --- a/script/build-osx +++ b/script/build-osx @@ -16,7 +16,7 @@ docker build \ --build-arg VBOX_REV="${VBOX_REV}" \ --build-arg MIXPANEL_TOKEN="${MIXPANEL_TOKEN}" \ . -CONTAINER="$(docker run -d osx-installer)" +CONTAINER="$(docker create osx-installer)" mkdir -p dist docker cp "${CONTAINER}":/DockerToolbox.pkg dist/ docker rm "${CONTAINER}" 2>/dev/null || true diff --git a/script/build-windows b/script/build-windows index fa849483..627edf78 100755 --- a/script/build-windows +++ b/script/build-windows @@ -17,7 +17,7 @@ docker build \ --build-arg VBOX_REV="${VBOX_REV}" \ --build-arg MIXPANEL_TOKEN="${MIXPANEL_TOKEN}" \ . -CONTAINER="$(docker run -d windows-installer)" +CONTAINER="$(docker create windows-installer)" mkdir -p dist docker cp "${CONTAINER}":/installer/Output/DockerToolbox.exe dist/ docker rm "${CONTAINER}" 2>/dev/null || true From 7f780467e33678e21c46282301a2b4d817123ff1 Mon Sep 17 00:00:00 2001 From: Max Peal Date: Sat, 9 Sep 2017 12:30:04 +0200 Subject: [PATCH 4/5] fix broken debug, see also e95cada26c20e96da18b183cb92597127669fa8c --- osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh | 2 +- windows/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh b/osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh index 49ca52b1..d2c69c36 100755 --- a/osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh +++ b/osx/mpkg/quickstart.app/Contents/Resources/Scripts/start.sh @@ -50,7 +50,7 @@ if [ $VM_EXISTS_CODE -eq 1 ]; then "${DOCKER_MACHINE}" create -d virtualbox $PROXY_ENV --virtualbox-memory 2048 --virtualbox-disk-size 204800 "${VM}" fi -VM_STATUS="$(${DOCKER_MACHINE} status ${VM} 2>&1)" +VM_STATUS="$( set +e ; ${DOCKER_MACHINE} status ${VM} )" if [ "${VM_STATUS}" != "Running" ]; then "${DOCKER_MACHINE}" start "${VM}" yes | "${DOCKER_MACHINE}" regenerate-certs "${VM}" diff --git a/windows/start.sh b/windows/start.sh index 9a679778..6332c103 100644 --- a/windows/start.sh +++ b/windows/start.sh @@ -61,7 +61,7 @@ if [ $VM_EXISTS_CODE -eq 1 ]; then fi STEP="Checking status on $VM" -VM_STATUS="$(${DOCKER_MACHINE} status ${VM} 2>&1)" +VM_STATUS="$( set +e ; ${DOCKER_MACHINE} status ${VM} )" if [ "${VM_STATUS}" != "Running" ]; then "${DOCKER_MACHINE}" start "${VM}" yes | "${DOCKER_MACHINE}" regenerate-certs "${VM}" From 44cb7051555f6ddb157140b1c59667e139b3ca82 Mon Sep 17 00:00:00 2001 From: Dan Buettner Date: Wed, 2 Aug 2017 11:47:48 -0500 Subject: [PATCH 5/5] Correct path to remove /Applications/Docker.app --- osx/uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osx/uninstall.sh b/osx/uninstall.sh index 85e2a21d..863618ac 100755 --- a/osx/uninstall.sh +++ b/osx/uninstall.sh @@ -17,7 +17,7 @@ while true; do done echo "Removing Applications..." -rm -rf /Applications/Docker +rm -rf /Applications/Docker.app echo "Removing docker binaries..." rm -f /usr/local/bin/docker