shell/Dockerfile

39 lines
1.3 KiB
Docker
Raw Normal View History

2020-03-01 11:54:20 +00:00
# focal 2020.01 dev
FROM ubuntu@sha256:d050ed7278c16ff627e4a70d7d353f1a2ec74d8a0b66e5a865356d92f5f6d87b
2020-03-02 05:24:20 +00:00
ENV DEBIAN_FRONTEND noninteractive
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
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-03-01 11:55:55 +00:00
ADD https://sneak.cloud/authorized_keys /root/.ssh/authorized_keys
2020-03-01 11:54:20 +00:00
COPY ./root /tmp/rootoverlay
# we only install essential system packages here
2020-03-18 01:01:08 +00:00
ARG SYSTEM_PACKAGES="build-essential ca-certificates openssh-server git golang rsync runit locales"
RUN \
apt update && \
apt -y upgrade && \
apt -y install $SYSTEM_PACKAGES && \
rsync -avP /tmp/rootoverlay/ / && \
2020-03-02 05:24:20 +00:00
rm -rf /tmp/rootoverlay && \
go get -v -u github.com/peterbourgon/runsvinit && \
cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \
rm -r /root/go && \
rm /etc/ssh/*host*key*
COPY ./run.sh /tmp/run.sh
RUN /bin/bash /tmp/run.sh && rm /tmp/run.sh
EXPOSE 22
2020-03-02 05:24:20 +00:00
CMD ["/usr/local/sbin/runsvinit"]