Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn authored on 2019/04/19 23:26:10... | ... |
@@ -29,17 +29,20 @@ COPY hack/dockerfile/install/install.sh ./install.sh |
29 | 29 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
30 | 30 |
RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME |
31 | 31 |
|
32 |
+# Build DockerSuite.TestBuild* dependency |
|
33 |
+FROM base AS contrib |
|
34 |
+COPY contrib/syscall-test /build/syscall-test |
|
35 |
+COPY contrib/httpserver/Dockerfile /build/httpserver/Dockerfile |
|
36 |
+COPY contrib/httpserver contrib/httpserver |
|
37 |
+RUN CGO_ENABLED=0 go build -buildmode=pie -o /build/httpserver/httpserver github.com/docker/docker/contrib/httpserver |
|
38 |
+ |
|
39 |
+# Build the integration tests and copy the resulting binaries to /build/tests |
|
32 | 40 |
FROM base AS builder |
33 | 41 |
|
34 | 42 |
# Set tag and add sources |
35 | 43 |
ARG DOCKER_GITCOMMIT |
36 | 44 |
ENV DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT:-undefined} |
37 | 45 |
COPY . . |
38 |
- |
|
39 |
-# Build DockerSuite.TestBuild* dependency |
|
40 |
-RUN CGO_ENABLED=0 go build -buildmode=pie -o /build/httpserver github.com/docker/docker/contrib/httpserver |
|
41 |
- |
|
42 |
-# Build the integration tests and copy the resulting binaries to /build/tests |
|
43 | 46 |
RUN hack/make.sh build-integration-test-binary |
44 | 47 |
RUN mkdir -p /build/tests && find . -name test.main -exec cp --parents '{}' /build/tests \; |
45 | 48 |
|
... | ... |
@@ -67,13 +70,11 @@ RUN apk --no-cache add \ |
67 | 67 |
COPY hack/test/e2e-run.sh /scripts/run.sh |
68 | 68 |
COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh |
69 | 69 |
|
70 |
-COPY contrib/httpserver/Dockerfile /tests/contrib/httpserver/Dockerfile |
|
71 |
-COPY contrib/syscall-test /tests/contrib/syscall-test |
|
72 | 70 |
COPY integration/testdata /tests/integration/testdata |
73 | 71 |
COPY integration/build/testdata /tests/integration/build/testdata |
74 | 72 |
COPY integration-cli/fixtures /tests/integration-cli/fixtures |
75 | 73 |
|
76 | 74 |
COPY --from=frozen-images /build/ /docker-frozen-images |
77 | 75 |
COPY --from=dockercli /build/ /usr/bin/ |
78 |
-COPY --from=builder /build/httpserver /tests/contrib/httpserver/httpserver |
|
76 |
+COPY --from=contrib /build/ /tests/contrib/ |
|
79 | 77 |
COPY --from=builder /build/tests /tests |