blob: 8447fe52911fc7829719049b3067bff6a613c995 (
plain) (
tree)
|
|
FROM ubuntu:20.04
MAINTAINER Johannes Stoelp <johannes.stoelp@gmail.com>
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
|