summaryrefslogtreecommitdiffstats
path: root/Services/ssh/Dockerfile
blob: 904a06496d838a946eb9485653426a348ce15a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM startx/fedora
MAINTAINER Christophe 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 ''

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

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