summaryrefslogtreecommitdiffstats
path: root/Services/ssh/Dockerfile
blob: ce02260a4fb3bc03f44a3f2bee332e33e3acc433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM startx/fedora
MAINTAINER Chistophe LARUE <dev@startx.fr>

# Install packages and set up sshd
RUN yum -y update \
    && yum -y install openssh-server \
    && yum clean all
RUN mkdir /var/run/sshd \
    && ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''

# Add ssh keys
COPY .ssh/authorized_keys /root/.ssh/authorized_keys

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