Samuli Silvius | 3be94e4 | 2019-03-22 10:00:43 +0200 | [diff] [blame] | 1 | # https://github.com/chrismeyersfsu/provision_docker/tree/master/files |
| 2 | FROM centos:centos7 |
| 3 | ENV container docker |
| 4 | |
| 5 | RUN yum -y update; yum clean all |
| 6 | |
| 7 | RUN systemctl mask dev-mqueue.mount dev-hugepages.mount \ |
| 8 | systemd-remount-fs.service sys-kernel-config.mount \ |
| 9 | sys-kernel-debug.mount sys-fs-fuse-connections.mount \ |
| 10 | display-manager.service graphical.target systemd-logind.service |
| 11 | |
| 12 | RUN yum -y install openssh-server sudo openssh-clients \ |
| 13 | epel-release python-docker-py iproute |
| 14 | RUN sed -i 's/#PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config |
| 15 | RUN ssh-keygen -q -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa && \ |
| 16 | ssh-keygen -q -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa && \ |
| 17 | ssh-keygen -q -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519 |
| 18 | RUN echo 'root:docker.io' | chpasswd |
| 19 | RUN systemctl enable sshd.service |
| 20 | |
| 21 | # firewalld needs this .. and I needs my firewalld |
| 22 | ADD dbus.service /etc/systemd/system/dbus.service |
| 23 | RUN systemctl enable dbus.service |
| 24 | |
| 25 | VOLUME ["/run"] |
| 26 | |
| 27 | EXPOSE 22 |
| 28 | |
| 29 | CMD ["/usr/sbin/init"] |