# vim: set fenc=utf-8 ts=2 sw=2 sts=2 et ft=Dockerfile : FROM fedora:33 LABEL maintainer="Tine Jozelj " ARG SSH_USER="${SSH_USER:-blink}" ARG SSH_PASSWORD="${SSH_PASSWORD:-blink}" SHELL ["/bin/bash", "-c"] RUN set -ueox pipefail \ && dnf -y update \ && dnf -y install \ git \ ca-certificates \ mosh \ openssh-server \ psmisc \ tmux \ vim \ && adduser "${SSH_USER}" \ && dnf clean all \ && rm -rf /tmp/* /var/tmp/* COPY . "/home/${SSH_USER}/.dotfiles"/ RUN chown -R "${SSH_USER}:${SSH_USER}" "/home/${SSH_USER}/.dotfiles" USER "${SSH_USER}" RUN ln -s "/home/${SSH_USER}/.dotfiles/tmux/tmux.conf" "/home/${SSH_USER}/.tmux.conf" \ && mkdir -p "/home/${SSH_USER}/.config" \ && ln -s "/home/${SSH_USER}/.dotfiles/nvim" "/home/${SSH_USER}/.config/nvim" \ && ln -s "/home/${SSH_USER}/.dotfiles/nvim/vimrc" "/home/${SSH_USER}/.vimrc" \ && git clone --depth 1 https://github.com/Shougo/dein.vim "/home/${SSH_USER}/.cache/vim/dein/repos/github.com/Shougo/dein.vim" \ && vim -V1 -es -i NONE -N --noplugin -u "/home/${SSH_USER}/.config/nvim/config/vimrc" \ -c "try | call dein#clear_state() | call dein#update() | finally | messages | qall! | endtry" USER root EXPOSE 22/tcp EXPOSE 22022/udp RUN mkdir -p /run/sshd CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config"]