Skip to content

Commit

Permalink
Move SSH configuration to /home/box volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Toilal committed Apr 3, 2015
1 parent d106d7f commit e24ae5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ ADD bin /home/box/bin
# Keep some etc configuration files
RUN mkdir /home/box/etc

RUN cp -R /etc/ssh /etc/ssh.default
RUN mv /etc/ssh /home/box/etc
RUN ln -s /home/box/etc/ssh /etc/ssh

Expand Down
5 changes: 5 additions & 0 deletions my_init.d/000_before_regen_ssh_host_keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

if [[ ! -e /etc/service/sshd/down && ! -e /home/box/etc/ssh/sshd_config ]] || [[ "$1" == "-f" ]]; then
cp -R /etc/ssh.default/* /home/box/etc/ssh/
fi

0 comments on commit e24ae5e

Please sign in to comment.