-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #527 from scrapinghub/master
Ability to override ubuntu:18.04
- Loading branch information
Showing
8 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM ubuntu:18.04 | ||
ARG BASE_IMAGE=ubuntu:18.04 | ||
FROM $BASE_IMAGE | ||
MAINTAINER Phusion <[email protected]> | ||
|
||
COPY . /bd_build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,8 @@ function cleanup() | |
docker rm $ID >/dev/null | ||
} | ||
|
||
PWD=`pwd` | ||
|
||
echo " --> Starting insecure container" | ||
ID=`docker run -d -p 22 -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insecure-key` | ||
ID=`docker run -d -p 22 $NAME:$VERSION /sbin/my_init --enable-insecure-key` | ||
sleep 1 | ||
|
||
echo " --> Obtaining SSH port number" | ||
|
@@ -29,14 +27,12 @@ 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 | ||
docker exec $ID /etc/my_init.d/00_regen_ssh_host_keys.sh -f | ||
docker exec $ID rm /etc/service/sshd/down | ||
docker exec $ID sv start /etc/service/sshd | ||
sleep 1 | ||
|
||
echo " --> Logging into container and running tests" | ||
cp image/services/sshd/keys/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 /tmp/insecure_key -p $SSHPORT [email protected] \ | ||
/bin/bash /test/test.sh | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
tools/docker-ssh $ID bash < test/test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters