mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 20:38:58 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
becf747182 | ||
|
|
673cd89f41 | ||
|
|
8cf2e208ff | ||
|
|
924f874d7e | ||
|
|
b89b718067 | ||
|
|
422781c7cf | ||
|
|
ed15d0d250 | ||
|
|
a018aba0c2 | ||
|
|
dd9d23f1ea | ||
|
|
2f0e1ad0b8 | ||
|
|
92a357a41f | ||
|
|
cb8cd8ad82 |
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
|||||||
NAME = phusion/baseimage
|
NAME = phusion/baseimage
|
||||||
VERSION = 0.10.1
|
VERSION = 0.10.2
|
||||||
|
|
||||||
.PHONY: all build test tag_latest release ssh
|
.PHONY: all build test tag_latest release ssh
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
delaycompress
|
delaycompress
|
||||||
compress
|
compress
|
||||||
postrotate
|
postrotate
|
||||||
sv reload syslog-ng > /dev/null
|
if [ -f /var/run/syslog-ng.pid ]; then
|
||||||
|
kill -HUP `cat /var/run/syslog-ng.pid`
|
||||||
|
fi
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +34,8 @@
|
|||||||
delaycompress
|
delaycompress
|
||||||
sharedscripts
|
sharedscripts
|
||||||
postrotate
|
postrotate
|
||||||
sv reload syslog-ng > /dev/null
|
if [ -f /var/run/syslog-ng.pid ]; then
|
||||||
|
kill -HUP `cat /var/run/syslog-ng.pid`
|
||||||
|
fi
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ destination d_newscrit { file("/var/log/news/news.crit"); };
|
|||||||
destination d_newserr { file("/var/log/news/news.err"); };
|
destination d_newserr { file("/var/log/news/news.err"); };
|
||||||
destination d_newsnotice { file("/var/log/news/news.notice"); };
|
destination d_newsnotice { file("/var/log/news/news.notice"); };
|
||||||
|
|
||||||
# Some `catch-all' logfiles.
|
# Some 'catch-all' logfiles.
|
||||||
#
|
#
|
||||||
destination d_debug { file("/var/log/debug"); };
|
destination d_debug { file("/var/log/debug"); };
|
||||||
destination d_error { file("/var/log/error"); };
|
destination d_error { file("/var/log/error"); };
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ else
|
|||||||
sed -i 's/##SYSLOG_OUTPUT_MODE_DEV_STDOUT##/file/' /etc/syslog-ng/syslog-ng.conf
|
sed -i 's/##SYSLOG_OUTPUT_MODE_DEV_STDOUT##/file/' /etc/syslog-ng/syslog-ng.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If /var/log is writable by another user logrotate will fail
|
||||||
|
/bin/chown root:root /var/log
|
||||||
|
/bin/chmod 0755 /var/log
|
||||||
|
|
||||||
PIDFILE="/var/run/syslog-ng.pid"
|
PIDFILE="/var/run/syslog-ng.pid"
|
||||||
SYSLOGNG_OPTS=""
|
SYSLOGNG_OPTS=""
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ function cleanup()
|
|||||||
PWD=`pwd`
|
PWD=`pwd`
|
||||||
|
|
||||||
echo " --> Starting insecure container"
|
echo " --> Starting insecure container"
|
||||||
ID=`docker run -d -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insecure-key`
|
ID=`docker run -d -p 22 -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insecure-key`
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo " --> Obtaining IP"
|
echo " --> Obtaining SSH port number"
|
||||||
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" "$ID"`
|
SSHPORT=`docker inspect --format='{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}' "$ID"`
|
||||||
if [[ "$IP" = "" ]]; then
|
if [[ "$SSHPORT" = "" ]]; then
|
||||||
abort "Unable to obtain container IP"
|
abort "Unable to obtain container SSH port number"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
@@ -38,5 +38,5 @@ echo " --> Logging into container and running tests"
|
|||||||
cp image/services/sshd/keys/insecure_key /tmp/insecure_key
|
cp image/services/sshd/keys/insecure_key /tmp/insecure_key
|
||||||
chmod 600 /tmp/insecure_key
|
chmod 600 /tmp/insecure_key
|
||||||
sleep 1 # Give container some more time to start up.
|
sleep 1 # Give container some more time to start up.
|
||||||
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/insecure_key root@$IP \
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/insecure_key -p $SSHPORT root@127.0.0.1 \
|
||||||
/bin/bash /test/test.sh
|
/bin/bash /test/test.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user