Dockerfile.e2e: re-order steps for caching
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5554bd1a7b
commit
63aefbfbca
|
@ -33,7 +33,7 @@ RUN ./hack/dockerfile/install/install.sh dockercli
|
||||||
# Set tag and add sources
|
# Set tag and add sources
|
||||||
ARG DOCKER_GITCOMMIT
|
ARG DOCKER_GITCOMMIT
|
||||||
ENV DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT:-undefined}
|
ENV DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT:-undefined}
|
||||||
ADD . .
|
COPY . .
|
||||||
|
|
||||||
# Build DockerSuite.TestBuild* dependency
|
# Build DockerSuite.TestBuild* dependency
|
||||||
RUN CGO_ENABLED=0 go build -buildmode=pie -o /output/httpserver github.com/docker/docker/contrib/httpserver
|
RUN CGO_ENABLED=0 go build -buildmode=pie -o /output/httpserver github.com/docker/docker/contrib/httpserver
|
||||||
|
@ -45,6 +45,13 @@ RUN mkdir -p /output/tests && find . -name test.main -exec cp --parents '{}' /ou
|
||||||
## Generate testing image
|
## Generate testing image
|
||||||
FROM alpine:3.9 as runner
|
FROM alpine:3.9 as runner
|
||||||
|
|
||||||
|
ENV DOCKER_REMOTE_DAEMON=1
|
||||||
|
ENV DOCKER_INTEGRATION_DAEMON_DEST=/
|
||||||
|
ENTRYPOINT ["/scripts/run.sh"]
|
||||||
|
|
||||||
|
# Add an unprivileged user to be used for tests which need it
|
||||||
|
RUN addgroup docker && adduser -D -G docker unprivilegeduser -s /bin/ash
|
||||||
|
|
||||||
# GNU tar is used for generating the emptyfs image
|
# GNU tar is used for generating the emptyfs image
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
bash \
|
bash \
|
||||||
|
@ -56,8 +63,8 @@ RUN apk --no-cache add \
|
||||||
tar \
|
tar \
|
||||||
xz
|
xz
|
||||||
|
|
||||||
# Add an unprivileged user to be used for tests which need it
|
COPY hack/test/e2e-run.sh /scripts/run.sh
|
||||||
RUN addgroup docker && adduser -D -G docker unprivilegeduser -s /bin/ash
|
COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh
|
||||||
|
|
||||||
COPY contrib/httpserver/Dockerfile /tests/contrib/httpserver/Dockerfile
|
COPY contrib/httpserver/Dockerfile /tests/contrib/httpserver/Dockerfile
|
||||||
COPY contrib/syscall-test /tests/contrib/syscall-test
|
COPY contrib/syscall-test /tests/contrib/syscall-test
|
||||||
|
@ -65,14 +72,7 @@ COPY integration/testdata /tests/integration/testdata
|
||||||
COPY integration/build/testdata /tests/integration/build/testdata
|
COPY integration/build/testdata /tests/integration/build/testdata
|
||||||
COPY integration-cli/fixtures /tests/integration-cli/fixtures
|
COPY integration-cli/fixtures /tests/integration-cli/fixtures
|
||||||
|
|
||||||
COPY hack/test/e2e-run.sh /scripts/run.sh
|
|
||||||
COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh
|
|
||||||
|
|
||||||
COPY --from=frozen-images /build/ /docker-frozen-images
|
COPY --from=frozen-images /build/ /docker-frozen-images
|
||||||
COPY --from=builder /output/httpserver /tests/contrib/httpserver/httpserver
|
COPY --from=builder /output/httpserver /tests/contrib/httpserver/httpserver
|
||||||
COPY --from=builder /output/tests /tests
|
COPY --from=builder /output/tests /tests
|
||||||
COPY --from=builder /usr/local/bin/docker /usr/bin/docker
|
COPY --from=builder /usr/local/bin/docker /usr/bin/docker
|
||||||
|
|
||||||
ENV DOCKER_REMOTE_DAEMON=1 DOCKER_INTEGRATION_DAEMON_DEST=/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/scripts/run.sh"]
|
|
||||||
|
|
Loading…
Reference in New Issue