26 lines
943 B
Docker
26 lines
943 B
Docker
FROM docker.io/library/archlinux
|
|
|
|
VOLUME /run/shared_sockets
|
|
VOLUME /opt
|
|
|
|
EXPOSE 22
|
|
|
|
COPY id-dev.pub /root/.ssh/authorized_keys
|
|
COPY id-chroot /root/.ssh/id-chroot
|
|
|
|
RUN sed -i '/^NoExtract/d' /etc/pacman.conf && \
|
|
pacman --noconfirm -Syu pacman-mirrorlist glibc base arch-install-scripts openssh python etckeeper git rsync && \
|
|
grep -om1 'Server.*' </etc/pacman.d/mirrorlist.pacnew >/etc/pacman.d/mirrorlist && \
|
|
chown -R root:root /root/.ssh && \
|
|
chmod 600 /root/.ssh/* && \
|
|
chmod 700 /root/.ssh && \
|
|
mkdir -p /etc/systemd/system/multi-user.target.wants && \
|
|
ln -s /usr/lib/systemd/system/systemd-timesyncd.service /etc/systemd/system/multi-user.target.wants/ && \
|
|
sed -i '/prohibit-password/s/.*/PermitRootLogin yes/' /etc/ssh/sshd_config && \
|
|
ln -s /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/
|
|
|
|
# for debug…
|
|
RUN pacman --noconfirm -S nmap vim
|
|
|
|
CMD [ "/sbin/init" ]
|