From 6059b8d8c6085426fce1a6e638af069750c9dd54 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 4 Dec 2021 18:30:54 +0100 Subject: added virtio post --- content/2021-12-02-toying-with-virtio/Dockerfile | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 content/2021-12-02-toying-with-virtio/Dockerfile (limited to 'content/2021-12-02-toying-with-virtio/Dockerfile') diff --git a/content/2021-12-02-toying-with-virtio/Dockerfile b/content/2021-12-02-toying-with-virtio/Dockerfile new file mode 100644 index 0000000..f892fef --- /dev/null +++ b/content/2021-12-02-toying-with-virtio/Dockerfile @@ -0,0 +1,44 @@ +FROM ubuntu:20.04 +MAINTAINER Johannes Stoelp + +ARG UID + +RUN apt update \ + && DEBIAN_FRONTEND=noninteractive \ + apt install \ + --yes \ + --no-install-recommends \ + # Download & unpack. + wget \ + ca-certificates \ + xz-utils \ + # Build tools & deps (kernel). + make \ + bc \ + gcc g++ \ + flex bison \ + libelf-dev \ + libncurses-dev \ + # Build tools & deps (initrd). + cpio \ + # Run & debug. + qemu-system-x86 \ + # Convenience. + sudo \ + telnet \ + ripgrep \ + fd-find \ + neovim \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +# Allow 'user' to use sudo without password. +# Convenience in case we want to install some packages in the container later. +RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/user + +# Create user with the UID passed during docker build. +RUN useradd --create-home --home-dir /home/user --uid $UID --shell /bin/bash user +# Start container with user. +USER user +# Change default working dir. +WORKDIR /develop -- cgit v1.2.3