Skip to content

Commit

Permalink
enable ssh access
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 10, 2019
1 parent b15fdf8 commit 1935b14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" &&
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \
tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

# Remove unused SSH service
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
# enable SSH
RUN rm -f /etc/service/sshd/down

# Enable Passenger and Nginx and remove the default site
# Preserve env variables for nginx
Expand Down Expand Up @@ -64,6 +64,7 @@ ADD vendor/docker/shoryuken.sh /etc/service/shoryuken/run

# Run additional scripts during container startup (i.e. not at build time)
RUN mkdir -p /etc/my_init.d
COPY vendor/docker/10_ssh.sh /etc/my_init.d/10_ssh.sh
COPY vendor/docker/70_index_page.sh /etc/my_init.d/70_index_page.sh
COPY vendor/docker/80_flush_cache.sh /etc/my_init.d/80_flush_cache.sh
COPY vendor/docker/90_migrate.sh /etc/my_init.d/90_migrate.sh
Expand Down
2 changes: 2 additions & 0 deletions vendor/docker/10_ssh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
dockerize -template /home/app/webapp/vendor/docker/authorized_keys.tmpl:/root/.ssh/authorized_keys
1 change: 1 addition & 0 deletions vendor/docker/authorized_keys.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Env.PUBLIC_KEY }}

0 comments on commit 1935b14

Please sign in to comment.