mirror of
/repos/baseimage-docker.git
synced 2025-12-30 08:01:31 +01:00
If you disable the installation of all services, you could have a != 0 output, and break the `docker build` process.
30 lines
881 B
Bash
Executable File
30 lines
881 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
source /bd_build/buildconfig
|
|
set -x
|
|
|
|
## Install init process.
|
|
cp /bd_build/bin/my_init /sbin/
|
|
mkdir -p /etc/my_init.d
|
|
mkdir -p /etc/container_environment
|
|
touch /etc/container_environment.sh
|
|
touch /etc/container_environment.json
|
|
chmod 700 /etc/container_environment
|
|
|
|
groupadd -g 8377 docker_env
|
|
chown :docker_env /etc/container_environment.sh /etc/container_environment.json
|
|
chmod 640 /etc/container_environment.sh /etc/container_environment.json
|
|
ln -s /etc/container_environment.sh /etc/profile.d/
|
|
|
|
## Install runit.
|
|
$minimal_apt_get_install runit
|
|
|
|
## Install a syslog daemon and logrotate.
|
|
[ "$DISABLE_SYSLOG" -eq 0 ] && /bd_build/services/syslog-ng/syslog-ng.sh || true
|
|
|
|
## Install the SSH server.
|
|
[ "$DISABLE_SSH" -eq 0 ] && /bd_build/services/sshd/sshd.sh || true
|
|
|
|
## Install cron daemon.
|
|
[ "$DISABLE_CRON" -eq 0 ] && /bd_build/services/cron/cron.sh || true
|