-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few packaging bugs, including and especially a temporary patch …
…to our upstart script to mount cgroups properly Docker-DCO-1.1-Signed-off-by: Andrew Page <[email protected]> (github: tianon) Docker-DCO-1.1-Signed-off-by: Tianon Gravi <[email protected]> (github: crosbymichael)
- Loading branch information
1 parent
0ab7b69
commit 2b3fdf2
Showing
4 changed files
with
123 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Docker Upstart and SysVinit configuration file | ||
|
||
# Customize location of Docker binary (especially for development testing). | ||
#DOCKER="/usr/local/bin/docker" | ||
|
||
# Use DOCKER_OPTS to modify the daemon startup options. | ||
#DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4" | ||
|
||
# If you need Docker to use an HTTP proxy, it can also be specified here. | ||
#export http_proxy="http://127.0.0.1:3128/" | ||
|
||
# This is also a handy place to tweak where Docker's temporary files go. | ||
#export TMPDIR="/mnt/bigdrive/docker-tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
description "Docker daemon" | ||
|
||
start on filesystem and started lxc-net | ||
start on filesystem | ||
stop on runlevel [!2345] | ||
|
||
respawn | ||
|
||
script | ||
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) | ||
DOCKER=/usr/bin/$UPSTART_JOB | ||
DOCKER_OPTS= | ||
if [ -f /etc/default/$UPSTART_JOB ]; then | ||
. /etc/default/$UPSTART_JOB | ||
fi | ||
if ! grep -q cgroup /proc/mounts; then | ||
# rough approximation of cgroupfs-mount | ||
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup | ||
for sys in $(cut -d' ' -f1 /proc/cgroups); do | ||
mkdir -p /sys/fs/cgroup/$sys | ||
if ! mount -n -t cgroup -o $sys cgroup /sys/fs/cgroup/$sys 2>/dev/null; then | ||
rmdir /sys/fs/cgroup/$sys 2>/dev/null || true | ||
fi | ||
done | ||
fi | ||
"$DOCKER" -d $DOCKER_OPTS | ||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters