From 79f5c598139113f7bbad292d3be09c550b842cde Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Mon, 29 May 2017 16:53:40 +0100 Subject: [PATCH] tests: Use Alpine base to compile virtsock test program Signed-off-by: Rolf Neugebauer --- test/pkg/virtsock/Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/pkg/virtsock/Dockerfile b/test/pkg/virtsock/Dockerfile index 3def1594b..25effd1a5 100644 --- a/test/pkg/virtsock/Dockerfile +++ b/test/pkg/virtsock/Dockerfile @@ -4,7 +4,10 @@ RUN apk add --no-cache --initdb -p /out \ tini RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache -FROM linuxkit/go-compile:4513068d9a7e919e4ec42e2d7ee879ff5b95b7f5@sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5 AS build +FROM linuxkit/alpine:451603daf499e3a40308dbf5571dcffed2343ffa AS build + +RUN apk add --no-cache go musl-dev git make +ENV GOPATH=/go PATH=$PATH:/go/bin ENV VIRTSOCK_COMMIT=3bfdf22e3b63a7d130ae5db41c2d76eaffa444d4 RUN mkdir -p $GOPATH/src/github.com/rneugeba && \ @@ -12,10 +15,11 @@ RUN mkdir -p $GOPATH/src/github.com/rneugeba && \ git clone https://github.com/rneugeba/virtsock.git WORKDIR $GOPATH/src/github.com/rneugeba/virtsock RUN git checkout $VIRTSOCK_COMMIT -RUN make build/virtsock_stress.linux -RUN cp -a build/virtsock_stress.linux /virtsock_stress +# Don't use go-compile.sh quite yet as the virtsock package is not yet lint free +RUN make build/virtsock_stress.linux && \ + cp -a build/virtsock_stress.linux /virtsock_stress FROM scratch COPY --from=mirror /out/ / -COPY --from=build virtsock_stress bin/virtsock_stress -CMD ["/sbin/tini", "/bin/virtsock_stress", "-s", "-v", "1"] +COPY --from=build virtsock_stress usr/bin/virtsock_stress +CMD ["/sbin/tini", "/usr/bin/virtsock_stress", "-s", "-v", "1"]