Files
linuxkit/test/pkg/virtsock/Dockerfile
Rolf Neugebauer 551e43294f tests: Update alpine base to multi-arch
The following packages did not work on aarch64:
- linuxkit/test-docker-bench
- linuxkit/test-ltp
- linuxkit/test-ns
- linuxkit/test-virtsock

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +01:00

26 lines
1017 B
Docker

FROM linuxkit/alpine:87a0cd10449d72f374f950004467737dbf440630 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
tini
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:87a0cd10449d72f374f950004467737dbf440630 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 && \
cd $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
# 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 usr/bin/virtsock_stress
CMD ["/sbin/tini", "/usr/bin/virtsock_stress", "-s", "-v", "1"]