~mclehman/guestctl

ref: ca4eddb5a9e458118c7a3e4304806370ab894dfc guestctl/resources/templates/dockerfile.tmpl -rw-r--r-- 651 bytes
ca4eddb5 — 0xFORDCOMMA Implement forward-compatible self-management system. 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM {{ base_image }}

RUN {{ package_manager }} {{ package_manager_update }} && {{ package_manager }} {{ package_manager_install }} {{ noconfirm }} {{ ssh_server }} sudo vim {{ aux_packages }}
RUN useradd -m {{ user }} && echo '{{ user }}:{{ temporarypassword }}' chpasswd
RUN groupadd -f sudo && gpasswd -a {{ user }} sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN ssh-keygen -A

RUN mkdir -p /home/{{ user }}/.ssh
RUN echo '{{ ssh_key }}' > /home/{{ user }}/.ssh/authorized_keys
COPY ssh/sshd_config /etc/ssh/sshd_config
COPY ssh/id_meta /home/{{ user }}/.ssh/id_meta

{{ aux_dockerfile }}

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]