From 0e7b99f445869723edaa85720ac39b3ff4fa52dc Mon Sep 17 00:00:00 2001 From: Fernando Alvarez Date: Wed, 5 Oct 2016 16:21:58 +0200 Subject: [PATCH] Migrate from Cnetos to Alpine base container Closes #2 --- Dockerfile | 15 +++++++++------ startvm | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 139921e..b2c6fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ -FROM centos:latest +FROM alpine:latest MAINTAINER BBVA Innovation ENV container docker -RUN yum clean all \ - && yum update -y \ - && yum install -y qemu-kvm bridge-utils iproute dnsmasq \ - && yum clean all +RUN apk -U --no-cache add \ + qemu \ + qemu-system-x86_64 \ + bridge-utils \ + bash \ + dnsmasq \ + && rm -rf /var/cache/apk/* COPY startvm /usr/local/bin/startvm RUN chmod u+x /usr/local/bin/startvm @@ -13,4 +16,4 @@ RUN chmod u+x /usr/local/bin/startvm VOLUME /image ENTRYPOINT ["/usr/local/bin/startvm"] -CMD [] +CMD [] \ No newline at end of file diff --git a/startvm b/startvm index 5b598cc..a024d5b 100755 --- a/startvm +++ b/startvm @@ -7,7 +7,7 @@ # If no arguments, the VM will lauch with 4 cores and 1GB of memory -: ${LAUNCHER:='/usr/libexec/qemu-kvm'} +: ${LAUNCHER:='/usr/bin/qemu-system-x86_64'} : ${DNSMASQ_CONF_DIR:='/etc/dnsmasq.d'} : ${DNSMASQ:='/usr/sbin/dnsmasq'} : ${ENABLE_DHCP:='Y'} @@ -19,7 +19,7 @@ "} : ${KVM_OPTS:="\ - -machine rhel6.0.0,accel=kvm,usb=off \ + -machine accel=kvm,usb=off \ -nodefaults \ -no-acpi \ -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \