2020-01-29 05:23:02 -05:00
|
|
|
ARG GO_VERSION=1.12.16
|
2018-03-19 18:56:51 -04:00
|
|
|
|
2018-05-17 07:11:59 -04:00
|
|
|
# Use Debian based image as docker-compose requires glibc.
|
|
|
|
FROM golang:${GO_VERSION}
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
curl \
|
|
|
|
openssl \
|
2018-09-06 01:38:01 -04:00
|
|
|
openssh-client \
|
2018-05-17 07:11:59 -04:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
ARG COMPOSE_VERSION=1.21.2
|
|
|
|
RUN curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose \
|
|
|
|
&& chmod +x /usr/local/bin/docker-compose
|
|
|
|
|
|
|
|
ARG NOTARY_VERSION=v0.6.1
|
|
|
|
RUN curl -Ls https://github.com/theupdateframework/notary/releases/download/${NOTARY_VERSION}/notary-Linux-amd64 -o /usr/local/bin/notary \
|
|
|
|
&& chmod +x /usr/local/bin/notary
|
|
|
|
|
2019-04-12 21:16:01 -04:00
|
|
|
ARG GOTESTSUM_VERSION=0.3.4
|
2019-01-24 11:53:42 -05:00
|
|
|
RUN curl -Ls https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_linux_amd64.tar.gz -o gotestsum.tar.gz \
|
|
|
|
&& tar -xf gotestsum.tar.gz gotestsum \
|
|
|
|
&& mv gotestsum /usr/local/bin/gotestsum \
|
|
|
|
&& rm gotestsum.tar.gz
|
|
|
|
|
2018-05-17 07:11:59 -04:00
|
|
|
ENV CGO_ENABLED=0 \
|
|
|
|
DISABLE_WARN_OUTSIDE_CONTAINER=1 \
|
|
|
|
PATH=/go/src/github.com/docker/cli/build:$PATH
|
|
|
|
WORKDIR /go/src/github.com/docker/cli
|
|
|
|
|
|
|
|
# Trust notary CA cert.
|
|
|
|
COPY e2e/testdata/notary/root-ca.cert /usr/share/ca-certificates/notary.cert
|
|
|
|
RUN echo 'notary.cert' >> /etc/ca-certificates.conf && update-ca-certificates
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
ARG VERSION
|
|
|
|
ARG GITCOMMIT
|
|
|
|
ENV VERSION=${VERSION} GITCOMMIT=${GITCOMMIT}
|
|
|
|
RUN ./scripts/build/binary
|
2018-12-11 09:15:04 -05:00
|
|
|
RUN ./scripts/build/plugins e2e/cli-plugins/plugins/*
|
2018-05-17 07:11:59 -04:00
|
|
|
|
|
|
|
CMD ./scripts/test/e2e/entry
|