Use our own qemu base image

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
This commit is contained in:
Justin Cormack 2016-09-11 12:12:41 +01:00 committed by Justin Cormack
parent c0fe2b959d
commit cb9178f314
6 changed files with 44 additions and 12 deletions

View File

@ -1,4 +1,4 @@
FROM justincormack/alpine-qemu
FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
COPY alpine/initrd.img.gz .
COPY alpine/kernel/x86_64/vmlinuz64 .

View File

@ -1,9 +0,0 @@
FROM justincormack/alpine-qemu
COPY alpine/initrd-arm.img .
COPY alpine/kernel/arm/zImage .
COPY alpine/kernel/dtb dtb
RUN gzip -9 initrd-arm.img
ENTRYPOINT [ "qemu-system-arm", "-machine", "vexpress-a15", "-cpu", "cortex-a15", "-no-reboot", "-netdev", "user,id=eth0", "-device", "virtio-net-device,netdev=eth0", "-serial", "stdio", "-kernel", "zImage", "-initrd", "initrd-arm.img.gz", "-dtb", "dtb/vexpress-v2p-ca15-tc1.dtb", "-m", "1024", "-append", "console=ttyAMA0,38400n8", "-vnc", "none" ]

View File

@ -1,4 +1,4 @@
FROM justincormack/alpine-qemu
FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
COPY alpine/mobylinux-bios.iso .

View File

@ -1,4 +1,4 @@
FROM justincormack/alpine-qemu
FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
COPY alpine/initrd.img.gz .
COPY alpine/kernel/x86_64/vmlinuz64 .

View File

@ -0,0 +1,9 @@
FROM alpine:3.4
RUN \
apk update && apk upgrade && \
apk add \
qemu-img \
qemu-system-arm \
qemu-system-x86_64 \
&& rm -rf /var/cache/apk/*

View File

@ -0,0 +1,32 @@
.PHONY: tag push
BASE=alpine:3.4
IMAGE=alpine-qemu
default: push
hash:
docker pull $(BASE)
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
docker run --rm $(IMAGE):build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash
push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):latest)
docker rmi $(IMAGE):build
rm -f hash
tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build
rm -f hash
clean:
rm -f hash
.DELETE_ON_ERROR: