-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to override ubuntu:18.04 #527
Changes from 7 commits
4f65f0a
089258a
9d29b23
17a737f
ad88ec9
4a3476b
6d6395c
36bd411
89597c5
d616b3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM ubuntu:18.04 | ||
ARG BASE_IMAGE | ||
FROM $BASE_IMAGE | ||
MAINTAINER Phusion <[email protected]> | ||
|
||
COPY . /bd_build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ rm -rf /tmp/* /var/tmp/* | |
rm -rf /var/lib/apt/lists/* | ||
|
||
# clean up python bytecode | ||
find / -name *.pyc -delete | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember getting plenty of "permission denied" errors here as |
||
find / -name *__pycache__* -delete | ||
find / -mount -name *.pyc -delete | ||
find / -mount -name *__pycache__* -delete | ||
|
||
rm -f /etc/ssh/ssh_host_* |
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,14 @@ 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither of these commands need input, so in that sense they don't need to be interactive nor should they expect their input to be a terminal. I wouldn't bother, but I was getting an error on this lines, suggesting to remove at least one of |
||
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] \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could not connect using localhost, only with the containers' IP. I wanted to remove duplication between these lines and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm actually more interested in line 38 and 39, what effect will result when insecure_key isn't copied into the container, or if it will have any effect on the tests. It looks like there is a new error raised during the
This is the only strange thing I found that looks wrong. I wonder if it's related to removing |
||
/bin/bash /test/test.sh | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
NAME=$NAME VERSION=$VERSION SSH_IDENTITY_FILE=/tmp/insecure_key \ | ||
SSH_COMMAND="'/bin/bash -s' < $DIR/test.sh" make ssh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably docker version dependent, but the
sed
substitution wasn't giving the expected output, so I've found out how the do the same with docker itself.