work/base/Dockerfile
2020-10-26 16:39:54 -07:00

54 lines
1.6 KiB
Docker

# focal as of 2020-04-23
FROM ubuntu:focal-20201008
ENV DEBIAN_FRONTEND noninteractive
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
ARG UID_TO_ADD=1000
ARG GID_TO_ADD=1000
ARG USERNAME_TO_ADD=user
RUN \
echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-updates main universe restricted multiverse" >> /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \
mv /etc/apt/sources.list.new /etc/apt/sources.list
RUN \
groupadd -g $GID_TO_ADD $USERNAME_TO_ADD && \
groupadd nixbld && \
useradd -u $UID_TO_ADD -g $GID_TO_ADD --home-dir /home/user -m -s /bin/bash $USERNAME_TO_ADD && \
usermod -p '*' $USERNAME_TO_ADD
ADD https://sneak.cloud/authorized_keys /root/.ssh/authorized_keys
ADD https://sneak.cloud/authorized_keys /home/user/.ssh/authorized_keys
RUN apt update && apt install -y \
anacron \
apt-transport-https \
build-essential \
ca-certificates \
cron \
cronic \
curl \
git \
golang \
locales \
openssh-server \
rsync \
runit \
sudo
RUN /bin/bash -c "echo -e 'Y\n\n' | /usr/local/sbin/unminimize"
RUN \
go get -v -u github.com/peterbourgon/runsvinit && \
cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \
rm -rf /root/go && \
apt -y purge golang && \
apt -y autoremove
CMD ["/usr/local/sbin/runsvinit"]