Commit 31740b56 authored by Jacob Blain Christen's avatar Jacob Blain Christen
Browse files

rootfs: add virt-what and enable guest services

Add the `virt-what` command to all platforms. When running on bare metal
or an unsupported architecture, i.e. `arm`, invoking `virt-what` is
equivalent to invoking `/bin/true`.

The `virt-what` output is used to enable appropriate guest services when running virtualized.
Showing with 17 additions and 2 deletions
+17 -2
......@@ -2,7 +2,6 @@
FROM alpine:3.11 as base
ARG ARCH
RUN apk --no-cache add \
$([ "$ARCH" == "amd64" ] && echo "open-vm-tools grub-bios") \
bash \
bash-completion \
blkid \
......@@ -13,6 +12,7 @@ RUN apk --no-cache add \
coreutils \
curl \
dbus \
dmidecode \
dosfstools \
e2fsprogs \
e2fsprogs-extra \
......@@ -56,4 +56,6 @@ RUN apk --no-cache add \
&& mv -vf /etc/conf.d/qemu-guest-agent /etc/conf.d/qemu-guest-agent.orig \
&& mv -vf /etc/conf.d/rngd /etc/conf.d/rngd.orig \
&& mv -vf /etc/conf.d/udev-settle /etc/conf.d/udev-settle.orig \
&& true
# replicate the default "no idea, friend" behavior of virt-what
&& touch /usr/sbin/virt-what \
&& chmod +x /usr/sbin/virt-what
File moved
ARG REPO
ARG TAG
FROM ${REPO}/k3os-base:${TAG} AS base
RUN apk --no-cache add \
virt-what
amd64 arm64
\ No newline at end of file
ARG REPO
ARG TAG
FROM ${REPO}/k3os-base:${TAG} AS base
RUN apk --no-cache add \
grub-bios \
open-vm-tools
\ No newline at end of file
amd64
\ No newline at end of file
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment