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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user