dropdog / docker-drupal

Docker LAMP for Drupal 6/7/8 - highly configurable
GNU General Public License v3.0
0 stars 0 forks source link

Copy ssh keys on Dockerfile #1

Open theodorosploumis opened 8 years ago

theodorosploumis commented 8 years ago

Maybe we should copy the ssh keys to the Docker container. See the Dockerfile at http://activelamp.com/blog/devops/drupal-build-process/.

...
# Setup SSH.
RUN mkdir /root/.ssh && chmod 700 /root/.ssh && touch /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys
RUN echo 'root:root' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN mkdir /var/run/sshd && chmod 0755 /var/run/sshd
RUN mkdir -p /root/.ssh
COPY keys/id_rsa.pub /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/authorized_keys
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
...
theodorosploumis commented 8 years ago

Namespaces are ready now for Docker 1.10.

https://blog.docker.com/2016/02/docker-1-10/