1
0
mirror of https://github.com/phusion/baseimage-docker.git synced 2026-03-26 20:38:58 +00:00

Compare commits

..

23 Commits

Author SHA1 Message Date
Travis Rowland
996e31b743 Incrementing version AFFECTS #485 2018-04-02 00:25:08 -07:00
Floor Drees
69a8fc1246 update Code of Conduct with contact persons 2018-03-05 10:30:11 +01:00
Travis Rowland
12718e6954 Merge pull request #470 from davidhiendl/master
fixed syslog warning when using --tty as described in #468
2018-03-04 19:53:43 -03:00
David Hiendl
be8fc49e52 fixed syslog warning when using --tty as described in #468 2018-02-22 08:53:27 +01:00
Travis Rowland
14896d9181 Merge pull request #466 from phusion/readme-fix
removed syslog-forwarder from readme
2018-02-19 17:13:21 -08:00
Zsolt Ero
9d63ae751c RAM usage updated in readme 2018-02-17 02:28:14 +01:00
Zsolt Ero
c5b6ed442d readme fix 2018-02-17 02:05:21 +01:00
Zsolt Ero
c40591ee2c removed syslog-forwarder from readme 2018-02-17 02:03:32 +01:00
Travis Rowland
be5d910bad Merge pull request #445 from phusion/Theaxiom-patch-1
my_init exits with 0 on SIGINT after runit is started
2018-01-31 23:09:55 -08:00
Travis Rowland
db73c10615 Merge branch 'master' into Theaxiom-patch-1 2018-01-31 22:57:45 -08:00
Travis Rowland
733dac8706 Merge pull request #465 from rdxmb/master
README.md -> fix SSH docs
2018-01-31 22:56:16 -08:00
Marc Bihlmaier
768d4b4d3f fix SSH README.md 2018-01-31 11:33:17 +01:00
rdxmb
b20ebe448c Merge pull request #1 from phusion/master
Rebase
2018-01-31 11:18:19 +01:00
Travis Rowland
adf8fd7805 Latest tag not yet necessary 2018-01-26 02:51:52 -08:00
Travis Rowland
670f189553 Merge pull request #463 from phusion/ci-test
Ci test
2018-01-26 02:44:52 -08:00
Travis Rowland
e81e664a72 Push master as latest 2018-01-26 02:36:46 -08:00
Travis Rowland
6b8be06bba GitLab CI is better 2018-01-26 02:26:03 -08:00
Travis Rowland
efc5865789 Was using incorrect variable replacements 2018-01-26 02:17:56 -08:00
Travis Rowland
300b96fb93 build local Dockerfile 2018-01-26 02:01:09 -08:00
Travis Rowland
1bffe76e6a don't remove image 2018-01-26 01:58:22 -08:00
Travis Rowland
7a639692ab Automated Docker builds 2018-01-26 01:54:38 -08:00
Travis Rowland
90e411fec2 Merge branch 'master' into Theaxiom-patch-1 2017-11-23 15:13:09 -08:00
Travis Rowland
7c7ab1a0a6 my_init exits with 0 on SIGINT after runit is started
fixes #358
2017-10-30 12:04:21 -07:00
7 changed files with 39 additions and 26 deletions

View File

@@ -3,17 +3,20 @@ sudo: required
services: services:
- docker - docker
script: env:
- make build global:
- NAME=phusion/baseimage
# - VERSION=${TRAVIS_TAG}
- VERSION=${TRAVIS_BRANCH}
deploy: script:
- provider: script - docker build -t ${NAME}:${VERSION} --rm image
script: make test_release - env NAME=${NAME} VERSION=${VERSION} ./test/runner.sh
on:
branch: master after_success:
tags: true - docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}";
condition: '$TRAVIS_TAG =~ ^[0-9]+(\.[0-9]+)*$' docker push ${NAME}:${VERSION};
- provider: script # - if [ "${TRAVIS_BRANCH}" == "master" ]; then
script: make test_master # docker tag ${NAME}:${VERSION} ${NAME}:latest
on: # docker push ${NAME}:latest;
branch: master # fi

View File

@@ -34,7 +34,13 @@ This Code of Conduct applies both within project spaces and in public spaces whe
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@phusion.nl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at Phusion Passenger:
[FloorD](https://github.com/floord) (she/her), floor@phusion.nl, English / Dutch / German
[OnixGH](https://github.com/OnixGH) (he/his), daniel@phusion.nl, English / Dutch
The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

View File

@@ -1,5 +1,5 @@
NAME = phusion/baseimage NAME = phusion/baseimage
VERSION = 0.10.0 VERSION = 0.10.1
.PHONY: all build test tag_latest release ssh .PHONY: all build test tag_latest release ssh

View File

@@ -3,7 +3,7 @@
[![](https://badge.imagelayers.io/phusion/baseimage:latest.svg)](https://imagelayers.io/?images=phusion/baseimage:latest 'Get your own badge on imagelayers.io') [![](https://badge.imagelayers.io/phusion/baseimage:latest.svg)](https://imagelayers.io/?images=phusion/baseimage:latest 'Get your own badge on imagelayers.io')
[![Travis](https://img.shields.io/travis/phusion/baseimage-docker.svg)](https://travis-ci.org/phusion/baseimage-docker) [![Travis](https://img.shields.io/travis/phusion/baseimage-docker.svg)](https://travis-ci.org/phusion/baseimage-docker)
_Baseimage-docker only consumes 6 MB RAM and is much more powerful than Busybox or Alpine. See why below._ _Baseimage-docker only consumes 8.3 MB RAM and is much more powerful than Busybox or Alpine. See why below._
Baseimage-docker is a special [Docker](https://www.docker.com) image that is configured for correct use within Docker containers. It is Ubuntu, plus: Baseimage-docker is a special [Docker](https://www.docker.com) image that is configured for correct use within Docker containers. It is Ubuntu, plus:
@@ -98,7 +98,7 @@ You can configure the stock `ubuntu` image yourself from your Dockerfile, so why
| `setuser` | A tool for running a command as another user. Easier to use than `su`, has a smaller attack vector than `sudo`, and unlike `chpst` this tool sets `$HOME` correctly. Available as `/sbin/setuser`. | | `setuser` | A tool for running a command as another user. Easier to use than `su`, has a smaller attack vector than `sudo`, and unlike `chpst` this tool sets `$HOME` correctly. Available as `/sbin/setuser`. |
| `install_clean` | A tool for installing `apt` packages that automatically cleans up after itself. All arguments are passed to `apt-get -y install --no-install-recommends` and after installation the apt caches are cleared. To include recommended packages, add `--install-recommends`. | | `install_clean` | A tool for installing `apt` packages that automatically cleans up after itself. All arguments are passed to `apt-get -y install --no-install-recommends` and after installation the apt caches are cleared. To include recommended packages, add `--install-recommends`. |
Baseimage-docker is very lightweight: it only consumes 6 MB of memory. Baseimage-docker is very lightweight: it only consumes 8.3 MB of memory.
<a name="docker_single_process"></a> <a name="docker_single_process"></a>
### Wait, I thought Docker is about running a single process in a container? ### Wait, I thought Docker is about running a single process in a container?
@@ -307,7 +307,7 @@ If you are sure that your environment variables don't contain sensitive data, th
<a name="logging"></a> <a name="logging"></a>
### System logging ### System logging
Baseimage-docker uses syslog-ng to provide a syslog facility to the container. Syslog-ng is not managed as an runit service (see below). Syslog messages are forwarded to the console via the service at /etc/service/syslog-forwarder. Baseimage-docker uses syslog-ng to provide a syslog facility to the container. Syslog-ng is not managed as an runit service (see below). Syslog messages are forwarded to the console.
#### Log startup/shutdown sequence #### Log startup/shutdown sequence
In order to ensure that all application log messages are captured by syslog-ng, syslog-ng is started separately before the runit supervisor process, and shutdown after runit exits. This uses the [startup script facility](#running_startup_scripts) provided by this image. This avoids a race condition which would exist if syslog-ng were managed as an runit service, where runit kills syslog-ng in parallel with the container's other services, causing log messages to be dropped during a graceful shutdown if syslog-ng exits while logs are still being produced by other services. In order to ensure that all application log messages are captured by syslog-ng, syslog-ng is started separately before the runit supervisor process, and shutdown after runit exits. This uses the [startup script facility](#running_startup_scripts) provided by this image. This avoids a race condition which would exist if syslog-ng were managed as an runit service, where runit kills syslog-ng in parallel with the container's other services, causing log messages to be dropped during a graceful shutdown if syslog-ng exits while logs are still being produced by other services.
@@ -450,7 +450,7 @@ Then, you can start your container with
docker run -d -v `pwd`/myfolder:/etc/my_init.d my/dockerimage docker run -d -v `pwd`/myfolder:/etc/my_init.d my/dockerimage
This will initialize sshd on container boot. You can then access it with the insecure key as below, or using the methods to add a secure key. Further, you can publish the port to your machine with -p 22:2222 allowing you to ssh to localhost:2222 instead of looking up the ip address. This will initialize sshd on container boot. You can then access it with the insecure key as below, or using the methods to add a secure key. Further, you can publish the port to your machine with -p 2222:22 allowing you to ssh to 127.0.0.1:2222 instead of looking up the ip address of the container.
<a name="ssh_keys"></a> <a name="ssh_keys"></a>
#### About SSH keys #### About SSH keys

View File

@@ -296,11 +296,8 @@ def start_runit():
def wait_for_runit_or_interrupt(pid): def wait_for_runit_or_interrupt(pid):
try:
status = waitpid_reap_other_children(pid) status = waitpid_reap_other_children(pid)
return (True, status) return (True, status)
except KeyboardInterrupt:
return (False, None)
def shutdown_runit_services(quiet=False): def shutdown_runit_services(quiet=False):

View File

@@ -75,7 +75,7 @@ destination d_xconsole { pipe("/dev/xconsole"); };
destination d_ppp { file("/var/log/ppp.log"); }; destination d_ppp { file("/var/log/ppp.log"); };
# stdout for docker # stdout for docker
destination d_stdout { pipe("/dev/stdout"); }; destination d_stdout { ##SYSLOG_OUTPUT_MODE_DEV_STDOUT##("/dev/stdout"); };
######################## ########################
# Filters # Filters

View File

@@ -7,6 +7,13 @@ set -em
if [ ! -S /dev/log ]; then rm -f /dev/log; fi if [ ! -S /dev/log ]; then rm -f /dev/log; fi
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
# determine output mode on /dev/stdout because of the issue documented at https://github.com/phusion/baseimage-docker/issues/468
if [ -p /dev/stdout ]; then
sed -i 's/##SYSLOG_OUTPUT_MODE_DEV_STDOUT##/pipe/' /etc/syslog-ng/syslog-ng.conf
else
sed -i 's/##SYSLOG_OUTPUT_MODE_DEV_STDOUT##/file/' /etc/syslog-ng/syslog-ng.conf
fi
PIDFILE="/var/run/syslog-ng.pid" PIDFILE="/var/run/syslog-ng.pid"
SYSLOGNG_OPTS="" SYSLOGNG_OPTS=""