~mclehman/guestctl

ref: 850cd391f19f975f74610e658fa6f570916a2bae guestctl/resources/templates/dockerfile.tmpl -rw-r--r-- 604 bytes View raw
850cd391 — 0xFORDCOMMA Merge branch 'master' of github-0xford:0xFORDCOMMA/guestctl 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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

{{ aux_dockerfile }}

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