Skip to content

Commit

Permalink
Fix master cli builds
Browse files Browse the repository at this point in the history
docker/cli builds changed with docker/cli#2993
Also minor fix to not clone by branch in order to make sure CLI_REPO
works.
Will follow-up to do the same for the other projects.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
  • Loading branch information
cpuguy83 committed Apr 9, 2021
1 parent f8337d0 commit cdf33e6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile.ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN \
iproute2 \
iptables \
jq \
libltdl7 \
libseccomp2 \
lvm2 \
make \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN \
iproute2 \
iptables \
jq \
libltdl7 \
libseccomp2 \
lvm2 \
make \
Expand Down
2 changes: 1 addition & 1 deletion cli/20.10/Dockerfile.ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \
make
WORKDIR /go/src/github.com/docker/cli
ARG CLI_REPO=https://github.com/docker/cli.git
RUN git clone --branch=20.10 --depth=1 ${CLI_REPO} .
RUN git clone --depth=1 ${CLI_REPO} .
# v20.10.5
ARG CLI_COMMIT=55c4c88966a912ddb365e2d73a4969e700fc458f
RUN if [ -n "${CLI_COMMIT}" ]; then git fetch origin "${CLI_COMMIT}" && git checkout "${CLI_COMMIT}"; fi
Expand Down
2 changes: 1 addition & 1 deletion cli/20.10/Dockerfile.ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
make
WORKDIR /go/src/github.com/docker/cli
ARG CLI_REPO=https://github.com/docker/cli.git
RUN git clone --branch=20.10 --depth=1 ${CLI_REPO} .
RUN git clone --depth=1 ${CLI_REPO} .
# v20.10.5
ARG CLI_COMMIT=55c4c88966a912ddb365e2d73a4969e700fc458f
RUN if [ -n "${CLI_COMMIT}" ]; then git fetch origin "${CLI_COMMIT}" && git checkout "${CLI_COMMIT}"; fi
Expand Down
3 changes: 2 additions & 1 deletion cli/master/Dockerfile.ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ ARG CLI_COMMIT
RUN if [ -n "${CLI_COMMIT}" ]; then git fetch origin "${CLI_COMMIT}" && git checkout "${CLI_COMMIT}"; fi
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
ENV VERSION=21.0.0-dev
ENV GO_LINKMODE=dynamic
RUN --mount=from=go,src=/usr/local/go,target=/usr/local/go \
PATH="/usr/local/go/bin:${PATH}" GOPATH=/go make dynbinary
PATH="/usr/local/go/bin:${PATH}" GOPATH=/go scripts/build/binary

FROM scratch as binary
COPY --from=build /go/src/github.com/docker/cli/build/docker /bin/
5 changes: 3 additions & 2 deletions cli/master/Dockerfile.ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ RUN apt-get update && apt-get install -y \
make
WORKDIR /go/src/github.com/docker/cli
ARG CLI_REPO=https://github.com/docker/cli.git
RUN git clone --branch=20.10 --depth=1 ${CLI_REPO} .
RUN git clone --depth=1 ${CLI_REPO} .
# v20.10.5
ARG CLI_COMMIT
RUN if [ -n "${CLI_COMMIT}" ]; then git fetch origin "${CLI_COMMIT}" && git checkout "${CLI_COMMIT}"; fi
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
ENV VERSION=21.0.0-dev
ENV GO_LINKMODE=dynamic
RUN --mount=from=go,src=/usr/local/go,target=/usr/local/go \
PATH="/usr/local/go/bin:${PATH}" GOPATH=/go make dynbinary
PATH="/usr/local/go/bin:${PATH}" GOPATH=/go scripts/build/binary

FROM scratch as binary
COPY --from=build /go/src/github.com/docker/cli/build/docker /bin/

0 comments on commit cdf33e6

Please sign in to comment.