mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
tests: Use Alpine base to compile virtsock test program
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
8cff978fab
commit
79f5c59813
@ -4,7 +4,10 @@ RUN apk add --no-cache --initdb -p /out \
|
|||||||
tini
|
tini
|
||||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
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
|
ENV VIRTSOCK_COMMIT=3bfdf22e3b63a7d130ae5db41c2d76eaffa444d4
|
||||||
RUN mkdir -p $GOPATH/src/github.com/rneugeba && \
|
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
|
git clone https://github.com/rneugeba/virtsock.git
|
||||||
WORKDIR $GOPATH/src/github.com/rneugeba/virtsock
|
WORKDIR $GOPATH/src/github.com/rneugeba/virtsock
|
||||||
RUN git checkout $VIRTSOCK_COMMIT
|
RUN git checkout $VIRTSOCK_COMMIT
|
||||||
RUN make build/virtsock_stress.linux
|
# Don't use go-compile.sh quite yet as the virtsock package is not yet lint free
|
||||||
RUN cp -a build/virtsock_stress.linux /virtsock_stress
|
RUN make build/virtsock_stress.linux && \
|
||||||
|
cp -a build/virtsock_stress.linux /virtsock_stress
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=mirror /out/ /
|
COPY --from=mirror /out/ /
|
||||||
COPY --from=build virtsock_stress bin/virtsock_stress
|
COPY --from=build virtsock_stress usr/bin/virtsock_stress
|
||||||
CMD ["/sbin/tini", "/bin/virtsock_stress", "-s", "-v", "1"]
|
CMD ["/sbin/tini", "/usr/bin/virtsock_stress", "-s", "-v", "1"]
|
||||||
|
Loading…
Reference in New Issue
Block a user