github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/Dockerfile.e2e (about) 1 ARG GO_VERSION=1.13.12 2 3 FROM golang:${GO_VERSION}-alpine AS base 4 ENV GO111MODULE=off 5 RUN apk --no-cache add \ 6 bash \ 7 btrfs-progs-dev \ 8 build-base \ 9 curl \ 10 lvm2-dev \ 11 jq 12 13 RUN mkdir -p /build/ 14 RUN mkdir -p /go/src/github.com/docker/docker/ 15 WORKDIR /go/src/github.com/docker/docker/ 16 17 FROM base AS frozen-images 18 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling 19 COPY contrib/download-frozen-image-v2.sh / 20 RUN /download-frozen-image-v2.sh /build \ 21 buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \ 22 busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \ 23 busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \ 24 debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \ 25 hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c 26 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list) 27 28 FROM base AS dockercli 29 ENV INSTALL_BINARY_NAME=dockercli 30 COPY hack/dockerfile/install/install.sh ./install.sh 31 COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ 32 RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME 33 34 # Build DockerSuite.TestBuild* dependency 35 FROM base AS contrib 36 COPY contrib/syscall-test /build/syscall-test 37 COPY contrib/httpserver/Dockerfile /build/httpserver/Dockerfile 38 COPY contrib/httpserver contrib/httpserver 39 RUN CGO_ENABLED=0 go build -buildmode=pie -o /build/httpserver/httpserver github.com/docker/docker/contrib/httpserver 40 41 # Build the integration tests and copy the resulting binaries to /build/tests 42 FROM base AS builder 43 44 # Set tag and add sources 45 COPY . . 46 # Copy test sources tests that use assert can print errors 47 RUN mkdir -p /build${PWD} && find integration integration-cli -name \*_test.go -exec cp --parents '{}' /build${PWD} \; 48 # Build and install test binaries 49 ARG DOCKER_GITCOMMIT=undefined 50 RUN hack/make.sh build-integration-test-binary 51 RUN mkdir -p /build/tests && find . -name test.main -exec cp --parents '{}' /build/tests \; 52 53 ## Generate testing image 54 FROM alpine:3.10 as runner 55 56 ENV DOCKER_REMOTE_DAEMON=1 57 ENV DOCKER_INTEGRATION_DAEMON_DEST=/ 58 ENTRYPOINT ["/scripts/run.sh"] 59 60 # Add an unprivileged user to be used for tests which need it 61 RUN addgroup docker && adduser -D -G docker unprivilegeduser -s /bin/ash 62 63 # GNU tar is used for generating the emptyfs image 64 RUN apk --no-cache add \ 65 bash \ 66 ca-certificates \ 67 g++ \ 68 git \ 69 iptables \ 70 pigz \ 71 tar \ 72 xz 73 74 COPY hack/test/e2e-run.sh /scripts/run.sh 75 COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh 76 77 COPY integration/testdata /tests/integration/testdata 78 COPY integration/build/testdata /tests/integration/build/testdata 79 COPY integration-cli/fixtures /tests/integration-cli/fixtures 80 81 COPY --from=frozen-images /build/ /docker-frozen-images 82 COPY --from=dockercli /build/ /usr/bin/ 83 COPY --from=contrib /build/ /tests/contrib/ 84 COPY --from=builder /build/ /