aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/2021-12-02-toying-with-virtio/Dockerfile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2021-12-04 18:30:54 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2021-12-04 18:30:54 +0100
commit6059b8d8c6085426fce1a6e638af069750c9dd54 (patch)
tree747ef72fda3b32405f90084d8f00f9d2d6163b07 /content/2021-12-02-toying-with-virtio/Dockerfile
parentc8a1ac71ce7e5c0183840513fb7bd2d642ca887e (diff)
downloadblog-6059b8d8c6085426fce1a6e638af069750c9dd54.tar.gz
blog-6059b8d8c6085426fce1a6e638af069750c9dd54.zip
added virtio post
Diffstat (limited to 'content/2021-12-02-toying-with-virtio/Dockerfile')
-rw-r--r--content/2021-12-02-toying-with-virtio/Dockerfile44
1 files changed, 44 insertions, 0 deletions
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 <johannes.stoelp@gmail.edu>
+
+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