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

@@ -28,8 +28,15 @@ fi
trap cleanup EXIT
echo " --> Enabling SSH in the container"
docker exec -t -i $ID /etc/my_init.d/00_regen_ssh_host_keys.sh -f
docker exec -t -i $ID rm /etc/service/sshd/down
docker exec -t -i $ID sv start /etc/service/sshd
sleep 1
echo " --> Logging into container and running tests"
chmod 600 image/insecure_key
cp image/insecure_key /tmp/insecure_key
chmod 600 /tmp/insecure_key
sleep 1 # Give container some more time to start up.
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i image/insecure_key root@$IP \
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/insecure_key root@$IP \
/bin/bash /test/test.sh