Commit Graph

134 Commits

Author SHA1 Message Date
Ryan Sundberg
a6bf447f9e Start syslog-ng before runit, and stop after runit.
When syslog-ng is managed as an runit service, application logs may be
lost during shutdown, when the syslog-ng service stops before the app
exits.

This change uses the my_init.d directory to manage syslog-ng at a lower
runlevel than runit.
2017-07-01 15:08:08 -07:00
Matthew Baggett
a3faefd3d3 Remove 3 unnecessary layers from the layer count. 2017-05-18 13:59:29 +01:00
Zsolt Ero
068b4534d4 prepare pre and post shudown.d folders (#407) 2017-05-11 17:13:49 +02:00
Zsolt Ero
2a8c9ebe38 apt-get fixes (#406)
* apt-fixes

* DEBIAN_FRONTEND teletype at the end
2017-05-09 11:39:43 +02:00
Zsolt Ero
7f77348a6b pre and post shutdown scripts added (#402) 2017-05-09 10:50:59 +02:00
Zsolt Ero
9f998e1a09 more pep8 linting (#400) 2017-05-09 09:52:48 +02:00
Jose Diaz-Gonzalez
7022d31858 chore: remove all E501 updates 2017-05-08 17:41:25 -06:00
Jose Diaz-Gonzalez
263b582139 feat: add newline and enforce file encoding 2017-05-08 17:23:07 -06:00
Jose Diaz-Gonzalez
f7dfb05850 refactor: improve pep8 compliance
This changeset fixes PEP8 issues, minus `E501 line too long (80 > 79 characters)`, as that should be more of a guideline than a strict rule, and harder to follow without silly refactoring.

Also removed two unused exception variables.
2017-05-08 17:07:48 -06:00
Xiangmin Jiao
b2c329af51 Suppress the status reports from "sv -w" 2017-04-22 20:46:36 -04:00
Kingdon Barrett
d3af157387 fixes the build
pam sources are missing (they were in main)
2017-04-19 20:11:06 -04:00
Tom Granqvist
06b065782d Fixing bug in my_init.shutdown_runit_services
The os.system() call received two arguments from a typo with string formatting.
2017-04-13 11:05:39 +03:00
Anshul Sharma
ac382d47b8 down wait for 7 secs this will fix it. 2017-04-11 08:07:32 +05:30
James Ravn
a5469e5572 Cast KILL*TIMEOUTS to int
As int is required by signal.alarm.
2017-04-07 11:36:31 +01:00
Travis Rowland
48d3f310ad Merge pull request #382 from lucafavatella/syslog-ng-system
Correct translation of syslog-ng driver `system()` on Docker
2017-03-23 12:04:57 -07:00
Luca Favatella
45facca75e Correct translation of syslog-ng driver system() on Docker
According to [the stock Ubuntu 16.04
config](https://github.com/hyperknot/baseimage16/blob/1.0.1/image/services/syslog-ng/syslog-ng.conf.original#L21),
the default source driver is `system()`, that is documented in [the
syslog-ng 3.5 official
documentation](https://www.balabit.com/documents/syslog-ng-ose-3.5-guides/en/syslog-ng-ose-guide-admin/html-single/index.html#configuring-source-system)
on Linux as `unix-dgram("/dev/log");` with some `/proc/kmsg`
involvement if kernel "is version 3.5 or newer".

`/proc/kmsg` causes trouble on Docker hence using syslog-ng 3.5 on
Docker `unix-dgram("/dev/log")` shall be used (not
`unix-stream("/dev/log");`).

If using syslog-ng
[3.6](https://www.balabit.com/documents/syslog-ng-ose-3.6-guides/en/syslog-ng-ose-guide-admin/html-single/index.html#configuring-source-system)
or
[newer](https://www.balabit.com/documents/syslog-ng-ose-3.9-guides/en/syslog-ng-ose-guide-admin/html-single/index.html#configuring-source-system)
on Docker, `system()` shall be able to be used.  But [Ubuntu 16.04 is
at syslog-ng 3.5](http://packages.ubuntu.com/xenial/syslog-ng-core) so
`system()` cannot be used.

See also https://github.com/phusion/baseimage-docker/issues/277
2017-03-23 18:10:36 +00:00
Enderson Maia
59677e23c3 Preserve /bd_build/{cleanup.sh,buildconfig} files. See #188
Signed-off-by: Enderson Maia <endersonmaia@gmail.com>
2017-03-22 14:41:18 -03:00
Travis Rowland
f7bba93be3 Preserve /build/{cleanup.sh,buildconfig} files. See #188 2017-03-21 03:37:00 -07:00
Travis Rowland
6216f70411 Revert "Merge branch 'i386' into next"
This reverts commit 34408d8013, reversing
changes made to 5d80f284b0.
2017-03-21 03:15:25 -07:00
Travis Rowland
34408d8013 Merge branch 'i386' into next 2017-03-21 03:06:29 -07:00
Travis Rowland
f9838ccce0 Revert "Preserve /build/{cleanup.sh,buildconfig} files." 2017-03-21 02:41:20 -07:00
Kingdon Barrett
9fed983d80 services/cron sshd syslog-ng are all directories
rm -f balks at wiping them out
2017-03-21 03:17:24 +00:00
Kingdon Barrett
2a9860b120 packages don't exist and aren't build deps on i386 2017-03-21 03:07:34 +00:00
Kingdon Barrett
a09aae6dba fix libgc bug for i386 baseimage-docker 2017-03-21 02:40:54 +00:00
Enderson Maia
e019d5fa11 Preserve /build/{cleanup.sh,buildconfig} files.
These files are useful for those who create Docker images based on this
baseimage, and need to make a final cleanup and/or use some
configurations that are inside buildconfig file.
2017-03-20 09:35:54 -03:00
Travis Rowland
d9e762730a cleaning up getter/setter for KILL_PROCESS_TIMEOUT/KILL_ALL_PROCESSES_TIMEOUT 2017-03-19 16:17:52 -07:00
Travis Rowland
7ec5a0a65f Merge branch 'master' of https://github.com/pavlobaron/baseimage-docker into pavlobaron-master 2017-03-19 16:15:04 -07:00
Travis Rowland
15e27eefe6 Merge pull request #363 from lukecampbell/setuser
Cleanup and improves readability of setuser
2017-03-19 01:32:30 -07:00
Travis Rowland
1811cb7530 Merge pull request #348 from milinnovations/fix_cron_pam
Provided a fix for cron not working out of the box.
2017-03-19 01:20:24 -07:00
Travis Rowland
fdda2d42bf Merge pull request #339 from zhouhaibing089/logrotate-fix
override the logrotate.conf without `su root syslog` Fixes #338
2017-03-19 01:07:02 -07:00
Travis Rowland
4e5a7e91ce Merge pull request #336 from axilleas/fix-locales
Reconfigure locales and expose them in Dockerfile
2017-03-19 01:04:14 -07:00
Travis Rowland
241c41e093 Merge pull request #203 from UnrealQuester/copy
Use COPY instead of ADD
2017-03-19 00:21:29 -07:00
Luke Campbell
ffb22ecf60 Cleanup and improves readability of setuser 2017-02-24 12:03:53 -05:00
Matěj Týč
ac1211b0ed Provided a fix for cron not working out of the box. 2016-11-15 16:41:47 +01:00
Achilleas Pipinellis
bb3fef5377 Expose the locales in Dockerfile
While the locales are generated with locale-gen, this does not enforce
the en_US.UTF-8 locale inside the container.

See the following links for more information:

- https://github.com/docker/docker/issues/2424
- http://jaredmarkell.com/docker-and-locales/
2016-09-12 09:49:24 +02:00
zhouhaibing089
d3eceae5ef override the logrotate.conf without su root syslog 2016-09-12 10:49:28 +08:00
Hongli Lai (Phusion)
9001796aa8 Upon rotating /var/log/syslog, restart syslog-forwarder 2016-07-08 20:20:25 +02:00
Ernestas Lukoševičius
50db81d8be Fix incorrect runit service name for syslog tail
Closes GH-292.
2016-07-08 20:16:33 +02:00
Hongli Lai (Phusion)
82862ec7f7 Do not set the APT force-unsafe-io flag
Docker already does this for us. Closes GH-265.
2016-07-08 20:09:24 +02:00
Hongli Lai (Phusion)
3edd5d1564 Fixes a problem in PAM which may cause chpasswd and related tools to fail
This is caused by Docker bug 6345 which is already closed, but for some
reason the problem still persists. Closes GH-181. Patch contributed
by Michael Zedeler.
2016-07-08 20:00:02 +02:00
Hongli Lai (Phusion)
6d5518974f Fix typo in my_init 2016-07-08 18:50:44 +02:00
Hongli Lai (Phusion)
c93a14391a During shutdown, repeatedly tell Runit to shutdown services
Works around a potential race condition in Runit itself.
Closes GH-315. Thanks to Chris Kite for submitting this patch.
2016-07-08 18:37:03 +02:00
Pierre Jacomet
e436d1c4af Changes to upgrade this to Ubuntu-16.04 2016-04-28 19:10:08 -07:00
pavlobaron
ea6b0ace79 configure process kill timeouts through environment with fallbacks 2016-01-22 09:49:48 +01:00
Alexander Buddenbrock
17eadef537 Use COPY instead of ADD
While COPY and ADD are essentially interchangeable here, it is still
considered good practice to use COPY whenever possible. From the docker
docks on best practices:

"Although ADD and COPY are functionally similar, generally speaking,
COPY is preferred. That’s because it’s more transparent than ADD.
[...] For other items (files, directories) that do not require ADD’s tar
auto-extraction capability, you should always use COPY."

Additionally, ADD commands were not cached prior to 0.7.3 (which was
released on 2013-01-02).
2015-12-14 21:34:23 +01:00
Enderson Maia
e053f04cf6 Fixed bug introduced in PR-182
If you disable the installation of all services, you could have a != 0
output, and break the `docker build` process.
2015-07-15 17:31:01 -03:00
Enderson Maia
9adbd423d0 Made services installation optional during build
You can user `ENV` directive in Dockerfile to disable the installation
for some services or change `image/buildconfig`.

The flags are :

DISABLE_SSHD
DISABLE_CRON
DISABLE_SYSLOG
2015-07-15 15:03:33 -03:00
Hongli Lai (Phusion)
7425da2825 Fix a potential hang in my_init during shutdown
Thanks to SAPikachu. Closes GH-151.
2015-07-15 17:35:45 +02:00
Hongli Lai (Phusion)
a9e956d9f9 syslog-ng: do not forward messages to /dev/tty10
Closes GH-222.
2015-07-15 15:27:03 +02:00
Hongli Lai (Phusion)
43af4a393e my_init container_environment.sh: ensure that environment variable names don't include characters unsupported by Bash
Closes GH-230.
2015-07-15 15:12:18 +02:00