mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
Merge pull request #1883 from ijc25/qemu-ga
Add a simple qemu guest agent package
This commit is contained in:
commit
8cbf7cb064
12
pkg/qemu-ga/Dockerfile
Normal file
12
pkg/qemu-ga/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 AS build
|
||||
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||
RUN mkdir -p /out/var/run
|
||||
RUN apk add --no-cache --initdb -p /out \
|
||||
qemu-guest-agent \
|
||||
musl
|
||||
FROM scratch
|
||||
WORKDIR /
|
||||
ENTRYPOINT []
|
||||
COPY --from=build /out /
|
||||
CMD ["/usr/bin/qemu-ga", "-p", "/dev/vport0p1"]
|
||||
LABEL org.mobyproject.config='{"net": "host"}'
|
14
pkg/qemu-ga/Makefile
Normal file
14
pkg/qemu-ga/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
.PHONY: tag push
|
||||
|
||||
ORG?=linuxkit
|
||||
IMAGE=qemu-ga
|
||||
|
||||
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
||||
|
||||
default: push
|
||||
|
||||
tag: Dockerfile
|
||||
docker build --network=none -t $(ORG)/$(IMAGE):$(HASH) .
|
||||
|
||||
push: tag
|
||||
docker pull $(ORG)/$(IMAGE):$(HASH) || docker push $(ORG)/$(IMAGE):$(HASH)
|
@ -20,6 +20,10 @@ onboot:
|
||||
- name: metadata
|
||||
image: "linuxkit/metadata:b053fd6a945829bb626bb3546cad69aae0ff7803"
|
||||
services:
|
||||
- name: qemu-ga
|
||||
image: "linuxkit/qemu-ga:e5fbcf55926f6e1a96b3e49a392e547e8be1022c"
|
||||
binds:
|
||||
- /dev/vport0p1:/dev/vport0p1
|
||||
- name: rngd
|
||||
image: "linuxkit/rngd:b67c3151a52b05db50e6207b40876900f2208d14"
|
||||
- name: ntpd
|
||||
|
Loading…
Reference in New Issue
Block a user