2021-10-14 09:04:14 +00:00
|
|
|
#FROM ubuntu:focal-20201008
|
|
|
|
FROM ubuntu@sha256:1d7b639619bdca2d008eca2d5293e3c43ff84cbee597ff76de3b7a7de3e84956
|
2020-10-26 23:39:54 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-10-14 09:04:14 +00:00
|
|
|
RUN apt update && apt install -y ca-certificates apt-transport-https
|
|
|
|
#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
|
2020-10-26 23:39:54 +00:00
|
|
|
|
|
|
|
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 \
|
2021-10-14 09:04:14 +00:00
|
|
|
avahi-daemon \
|
2020-10-26 23:39:54 +00:00
|
|
|
build-essential \
|
2021-10-14 09:04:14 +00:00
|
|
|
byobu \
|
2020-10-26 23:39:54 +00:00
|
|
|
ca-certificates \
|
|
|
|
cron \
|
|
|
|
cronic \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
golang \
|
2021-10-14 09:04:14 +00:00
|
|
|
iproute2 \
|
|
|
|
iputils-ping \
|
2020-10-26 23:39:54 +00:00
|
|
|
locales \
|
|
|
|
openssh-server \
|
|
|
|
rsync \
|
|
|
|
runit \
|
2021-10-14 09:04:14 +00:00
|
|
|
sudo \
|
|
|
|
vim \
|
|
|
|
zsh
|
2020-10-26 23:39:54 +00:00
|
|
|
|
|
|
|
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 && \
|
2021-10-14 09:04:14 +00:00
|
|
|
apt -y upgrade && \
|
2020-10-26 23:39:54 +00:00
|
|
|
apt -y autoremove
|
|
|
|
|
2021-10-14 09:04:14 +00:00
|
|
|
RUN usermod --shell $(which zsh) $USERNAME_TO_ADD
|
|
|
|
|
2020-10-26 23:39:54 +00:00
|
|
|
CMD ["/usr/local/sbin/runsvinit"]
|