mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-28 21:18:28 +00:00
test: Use tini from alpine base in the virtsock test package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
ab5bb75642
commit
91d267bcb5
@ -1,4 +1,10 @@
|
|||||||
FROM linuxkit/go-compile:4513068d9a7e919e4ec42e2d7ee879ff5b95b7f5@sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5 AS virtsock-build
|
FROM linuxkit/alpine:dae8bcbc6e2cec0a1cc1958dddbc5d6bd3ccf9a0@sha256:02c251d54c4083a596ead8cae92144306b385db0ff961c95a3a620a4c69961ed 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/go-compile:4513068d9a7e919e4ec42e2d7ee879ff5b95b7f5@sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5 AS build
|
||||||
|
|
||||||
ENV VIRTSOCK_COMMIT=3bfdf22e3b63a7d130ae5db41c2d76eaffa444d4
|
ENV VIRTSOCK_COMMIT=3bfdf22e3b63a7d130ae5db41c2d76eaffa444d4
|
||||||
RUN mkdir -p $GOPATH/src/github.com/rneugeba && \
|
RUN mkdir -p $GOPATH/src/github.com/rneugeba && \
|
||||||
@ -9,6 +15,7 @@ RUN git checkout $VIRTSOCK_COMMIT
|
|||||||
RUN make build/virtsock_stress.linux
|
RUN make build/virtsock_stress.linux
|
||||||
RUN cp -a build/virtsock_stress.linux /virtsock_stress
|
RUN cp -a build/virtsock_stress.linux /virtsock_stress
|
||||||
|
|
||||||
FROM linuxkit/tini:cb32c9b3ceb16505e1d62919cf28c8b52bf6d57e@sha256:1645296b3e155f8cf672f71f8d20b274bf38ee94c39dd1b58f7b18e0163b00b8
|
FROM scratch
|
||||||
COPY --from=virtsock-build virtsock_stress bin/virtsock_stress
|
COPY --from=mirror /out/ /
|
||||||
CMD ["/bin/tini", "/bin/virtsock_stress", "-s", "-v", "1"]
|
COPY --from=build virtsock_stress bin/virtsock_stress
|
||||||
|
CMD ["/sbin/tini", "/bin/virtsock_stress", "-s", "-v", "1"]
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
.PHONY: tag push
|
.PHONY: tag push
|
||||||
default: push
|
default: push
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=test-virtsock
|
IMAGE=test-virtsock
|
||||||
DEPS=Dockerfile Makefile
|
DEPS=Dockerfile Makefile
|
||||||
|
|
||||||
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
||||||
|
|
||||||
tag: $(DEPS)
|
tag: $(DEPS)
|
||||||
docker build --no-cache -t linuxkit/$(IMAGE):$(HASH) .
|
docker build --squash --no-cache -t $(ORG)/$(IMAGE):$(HASH) .
|
||||||
|
|
||||||
push: tag
|
push: tag
|
||||||
docker pull linuxkit/$(IMAGE):$(HASH) || \
|
docker pull $(ORG)/$(IMAGE):$(HASH) || \
|
||||||
docker push linuxkit/$(IMAGE):$(HASH)
|
docker push $(ORG)/$(IMAGE):$(HASH)
|
||||||
|
Loading…
Reference in New Issue
Block a user