mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-25 20:07:55 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8d48f3af4 | ||
|
|
d37f7aff3f | ||
|
|
f802be0dfe | ||
|
|
5493db5179 | ||
|
|
becf747182 | ||
|
|
0c9eaf3c43 | ||
|
|
673cd89f41 | ||
|
|
8cf2e208ff | ||
|
|
924f874d7e | ||
|
|
b89b718067 | ||
|
|
422781c7cf | ||
|
|
ed15d0d250 | ||
|
|
a018aba0c2 | ||
|
|
dd9d23f1ea | ||
|
|
d796c2e32c | ||
|
|
f936902c23 | ||
|
|
43791943e5 | ||
|
|
2f0e1ad0b8 | ||
|
|
92a357a41f | ||
|
|
cb8cd8ad82 |
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
||||
NAME = phusion/baseimage
|
||||
VERSION = 0.10.1
|
||||
VERSION = 0.11
|
||||
|
||||
.PHONY: all build test tag_latest release ssh
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.04
|
||||
FROM ubuntu:18.04
|
||||
MAINTAINER Phusion <info@phusion.nl>
|
||||
|
||||
COPY . /bd_build
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
delaycompress
|
||||
compress
|
||||
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
|
||||
}
|
||||
|
||||
@@ -32,6 +34,8 @@
|
||||
delaycompress
|
||||
sharedscripts
|
||||
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
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@version: 3.5
|
||||
@version: 3.13
|
||||
@include "scl.conf"
|
||||
@include "`scl-root`/system/tty10.conf"
|
||||
|
||||
# Syslog-ng configuration file, compatible with default Debian syslogd
|
||||
# installation.
|
||||
@@ -54,7 +53,7 @@ destination d_newscrit { file("/var/log/news/news.crit"); };
|
||||
destination d_newserr { file("/var/log/news/news.err"); };
|
||||
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_error { file("/var/log/error"); };
|
||||
@@ -134,6 +133,8 @@ log { source(s_src); filter(f_mail); destination(d_mail); };
|
||||
log { source(s_src); filter(f_news); filter(f_crit); destination(d_newscrit); };
|
||||
log { source(s_src); filter(f_news); filter(f_err); destination(d_newserr); };
|
||||
log { source(s_src); filter(f_news); filter(f_notice); destination(d_newsnotice); };
|
||||
#log { source(s_src); filter(f_cnews); destination(d_console_all); };
|
||||
#log { source(s_src); filter(f_cother); destination(d_console_all); };
|
||||
|
||||
#log { source(s_src); filter(f_ppp); destination(d_ppp); };
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ else
|
||||
sed -i 's/##SYSLOG_OUTPUT_MODE_DEV_STDOUT##/file/' /etc/syslog-ng/syslog-ng.conf
|
||||
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"
|
||||
SYSLOGNG_OPTS=""
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ source /bd_build/buildconfig
|
||||
set -x
|
||||
|
||||
## Often used tools.
|
||||
$minimal_apt_get_install curl less vim-tiny psmisc
|
||||
$minimal_apt_get_install curl less vim-tiny psmisc gpg-agent dirmngr
|
||||
ln -s /usr/bin/vim.tiny /usr/bin/vim
|
||||
|
||||
## This tool runs a command as another user and sets $HOME.
|
||||
|
||||
@@ -17,13 +17,13 @@ function cleanup()
|
||||
PWD=`pwd`
|
||||
|
||||
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
|
||||
|
||||
echo " --> Obtaining IP"
|
||||
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" "$ID"`
|
||||
if [[ "$IP" = "" ]]; then
|
||||
abort "Unable to obtain container IP"
|
||||
echo " --> Obtaining SSH port number"
|
||||
SSHPORT=`docker inspect --format='{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}' "$ID"`
|
||||
if [[ "$SSHPORT" = "" ]]; then
|
||||
abort "Unable to obtain container SSH port number"
|
||||
fi
|
||||
|
||||
trap cleanup EXIT
|
||||
@@ -38,5 +38,5 @@ 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 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
|
||||
|
||||
Reference in New Issue
Block a user