dev-pod/Dockerfile

43 lines
1.6 KiB
Docker

FROM ubuntu:rolling
# Nix + systemd
RUN apt update -y
RUN apt install curl systemd zsh -y
RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \
--extra-conf "sandbox = false" \
--no-start-daemon \
--no-confirm
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
RUN nix run nixpkgs#hello
RUN systemctl enable nix-daemon.service
CMD [ "/usr/lib/systemd/systemd" ]
# SSH
RUN apt update && apt install -y openssh-server
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
RUN echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config
RUN systemctl enable ssh
EXPOSE 22
# set up the root-group to share files
RUN sed -i "s/^UMASK//" /etc/login.defs
RUN sed -i -e '$aUMASK 002' /etc/login.defs
# Unminimize
RUN apt install -y unminimize
RUN yes | unminimize
# basic packages
COPY ./basics.list /tmp/apt.list
RUN apt install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y $(grep -vE "^\s*#" /tmp/apt.list | tr "\n" " ")
RUN rm /tmp/apt.list
# Shell
RUN chsh -s /usr/bin/zsh root
# Latex packages
COPY ./tex.list /tmp/apt.list
RUN apt install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y $(grep -vE "^\s*#" /tmp/apt.list | tr "\n" " ")
RUN rm /tmp/apt.list
# FRET packages
COPY ./fret.list /tmp/apt.list
RUN apt install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y $(grep -vE "^\s*#" /tmp/apt.list | tr "\n" " ")
RUN rm /tmp/apt.list
# Nix
RUN nix profile install nixpkgs\#chromium
# Add user dev
RUN useradd -d /root -g root dev
RUN chmod g+w /root