mirror of
/repos/baseimage-docker.git
synced 2026-02-27 17:41:59 +01:00
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
This commit is contained in:
2
image/services/cron/cron.runit
Executable file
2
image/services/cron/cron.runit
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/cron -f
|
||||
17
image/services/cron/cron.sh
Executable file
17
image/services/cron/cron.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
source /bd_build/buildconfig
|
||||
set -x
|
||||
|
||||
$minimal_apt_get_install cron
|
||||
mkdir /etc/service/cron
|
||||
chmod 600 /etc/crontab
|
||||
cp /bd_build/services/cron/cron.runit /etc/service/cron/run
|
||||
|
||||
## Remove useless cron entries.
|
||||
# Checks for lost+found and scans for mtab.
|
||||
rm -f /etc/cron.daily/standard
|
||||
rm -f /etc/cron.daily/upstart
|
||||
rm -f /etc/cron.daily/dpkg
|
||||
rm -f /etc/cron.daily/password
|
||||
rm -f /etc/cron.weekly/fstrim
|
||||
Reference in New Issue
Block a user