1
0
mirror of /repos/baseimage-docker.git synced 2026-02-26 17:32:03 +01:00

Make 'docker exec' the default and disable SSH by default

Closes GH-168.
This commit is contained in:
Hongli Lai (Phusion)
2015-01-19 16:39:14 +01:00
parent a0a48d8fd3
commit 2640bc7b03
5 changed files with 48 additions and 76 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
set -e
if [[ ! -e /etc/ssh/ssh_host_rsa_key ]]; then
if [[ ! -e /etc/service/sshd/down && ! -e /etc/ssh/ssh_host_rsa_key ]] || [[ "$1" == "-f" ]]; then
echo "No SSH host key available. Generating one..."
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive

View File

@@ -36,6 +36,7 @@ $minimal_apt_get_install logrotate
$minimal_apt_get_install openssh-server
mkdir /var/run/sshd
mkdir /etc/service/sshd
touch /etc/service/sshd/down
cp /build/runit/sshd /etc/service/sshd/run
cp /build/config/sshd_config /etc/ssh/sshd_config
cp /build/00_regen_ssh_host_keys.sh /etc/my_init.d/