1
0
mirror of /repos/baseimage-docker.git synced 2025-12-30 08:01:31 +01:00

Rename /build to /bd_build for fewer AUFS layer collissions

This commit is contained in:
Hongli Lai (Phusion) 2015-07-15 14:28:55 +02:00
parent 68a94437d9
commit 9e65ebfbdc
No known key found for this signature in database
GPG Key ID: 2AF96EB85EF4DA0D
5 changed files with 23 additions and 23 deletions

View File

@ -2,11 +2,11 @@ FROM ubuntu:14.04
MAINTAINER Phusion <info@phusion.nl> MAINTAINER Phusion <info@phusion.nl>
ENV HOME /root ENV HOME /root
ADD . /build ADD . /bd_build
RUN /build/prepare.sh && \ RUN /bd_build/prepare.sh && \
/build/system_services.sh && \ /bd_build/system_services.sh && \
/build/utilities.sh && \ /bd_build/utilities.sh && \
/build/cleanup.sh /bd_build/cleanup.sh
CMD ["/sbin/my_init"] CMD ["/sbin/my_init"]

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
source /build/buildconfig source /bd_build/buildconfig
set -x set -x
apt-get clean apt-get clean
rm -rf /build rm -rf /bd_build
rm -rf /tmp/* /var/tmp/* rm -rf /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
rm -f /etc/dpkg/dpkg.cfg.d/02apt-speedup rm -f /etc/dpkg/dpkg.cfg.d/02apt-speedup

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -e
source /build/buildconfig source /bd_build/buildconfig
set -x set -x
## Temporarily disable dpkg fsync to make building faster. ## Temporarily disable dpkg fsync to make building faster.

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
source /build/buildconfig source /bd_build/buildconfig
set -x set -x
## Install init process. ## Install init process.
cp /build/bin/my_init /sbin/ cp /bd_build/bin/my_init /sbin/
mkdir -p /etc/my_init.d mkdir -p /etc/my_init.d
mkdir -p /etc/container_environment mkdir -p /etc/container_environment
touch /etc/container_environment.sh touch /etc/container_environment.sh
@ -22,9 +22,9 @@ $minimal_apt_get_install runit
## Install a syslog daemon. ## Install a syslog daemon.
$minimal_apt_get_install syslog-ng-core $minimal_apt_get_install syslog-ng-core
mkdir /etc/service/syslog-ng mkdir /etc/service/syslog-ng
cp /build/runit/syslog-ng /etc/service/syslog-ng/run cp /bd_build/runit/syslog-ng /etc/service/syslog-ng/run
mkdir -p /var/lib/syslog-ng mkdir -p /var/lib/syslog-ng
cp /build/config/syslog_ng_default /etc/default/syslog-ng cp /bd_build/config/syslog_ng_default /etc/default/syslog-ng
touch /var/log/syslog touch /var/log/syslog
chmod u=rw,g=r,o= /var/log/syslog chmod u=rw,g=r,o= /var/log/syslog
# Replace the system() source because inside Docker we # Replace the system() source because inside Docker we
@ -33,36 +33,36 @@ sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng/sys
## Install syslog to "docker logs" forwarder. ## Install syslog to "docker logs" forwarder.
mkdir /etc/service/syslog-forwarder mkdir /etc/service/syslog-forwarder
cp /build/runit/syslog-forwarder /etc/service/syslog-forwarder/run cp /bd_build/runit/syslog-forwarder /etc/service/syslog-forwarder/run
## Install logrotate. ## Install logrotate.
$minimal_apt_get_install logrotate $minimal_apt_get_install logrotate
cp /build/config/logrotate_syslogng /etc/logrotate.d/syslog-ng cp /bd_build/config/logrotate_syslogng /etc/logrotate.d/syslog-ng
## Install the SSH server. ## Install the SSH server.
$minimal_apt_get_install openssh-server $minimal_apt_get_install openssh-server
mkdir /var/run/sshd mkdir /var/run/sshd
mkdir /etc/service/sshd mkdir /etc/service/sshd
touch /etc/service/sshd/down touch /etc/service/sshd/down
cp /build/runit/sshd /etc/service/sshd/run cp /bd_build/runit/sshd /etc/service/sshd/run
cp /build/config/sshd_config /etc/ssh/sshd_config cp /bd_build/config/sshd_config /etc/ssh/sshd_config
cp /build/00_regen_ssh_host_keys.sh /etc/my_init.d/ cp /bd_build/00_regen_ssh_host_keys.sh /etc/my_init.d/
## Install default SSH key for root and app. ## Install default SSH key for root and app.
mkdir -p /root/.ssh mkdir -p /root/.ssh
chmod 700 /root/.ssh chmod 700 /root/.ssh
chown root:root /root/.ssh chown root:root /root/.ssh
cp /build/insecure_key.pub /etc/insecure_key.pub cp /bd_build/insecure_key.pub /etc/insecure_key.pub
cp /build/insecure_key /etc/insecure_key cp /bd_build/insecure_key /etc/insecure_key
chmod 644 /etc/insecure_key* chmod 644 /etc/insecure_key*
chown root:root /etc/insecure_key* chown root:root /etc/insecure_key*
cp /build/bin/enable_insecure_key /usr/sbin/ cp /bd_build/bin/enable_insecure_key /usr/sbin/
## Install cron daemon. ## Install cron daemon.
$minimal_apt_get_install cron $minimal_apt_get_install cron
mkdir /etc/service/cron mkdir /etc/service/cron
chmod 600 /etc/crontab chmod 600 /etc/crontab
cp /build/runit/cron /etc/service/cron/run cp /bd_build/runit/cron /etc/service/cron/run
## Remove useless cron entries. ## Remove useless cron entries.
# Checks for lost+found and scans for mtab. # Checks for lost+found and scans for mtab.

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
source /build/buildconfig source /bd_build/buildconfig
set -x set -x
## Often used tools. ## Often used tools.
$minimal_apt_get_install curl less nano vim psmisc $minimal_apt_get_install curl less nano vim psmisc
## This tool runs a command as another user and sets $HOME. ## This tool runs a command as another user and sets $HOME.
cp /build/bin/setuser /sbin/setuser cp /bd_build/bin/setuser /sbin/setuser