blob: 8c024ab92cdb50800bf98d489402f9320a950995 [file] [log] [blame]
Samuli Silvius3be94e42019-03-22 10:00:43 +02001# https://github.com/chrismeyersfsu/provision_docker/tree/master/files
2FROM centos:centos7
3ENV container docker
4
5RUN yum -y update; yum clean all
6
7RUN 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
12RUN yum -y install openssh-server sudo openssh-clients \
13 epel-release python-docker-py iproute
14RUN sed -i 's/#PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
15RUN 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
18RUN echo 'root:docker.io' | chpasswd
19RUN systemctl enable sshd.service
20
21# firewalld needs this .. and I needs my firewalld
22ADD dbus.service /etc/systemd/system/dbus.service
23RUN systemctl enable dbus.service
24
25VOLUME ["/run"]
26
27EXPOSE 22
28
29CMD ["/usr/sbin/init"]