forked from ports/contrib
docker: cleaned up, added docker.conf
This commit is contained in:
parent
e8c17ae61b
commit
d5bc156b9d
@ -1,6 +1,7 @@
|
|||||||
drwxr-xr-x root/root etc/
|
drwxr-xr-x root/root etc/
|
||||||
drwxr-xr-x root/root etc/bash_completion.d/
|
drwxr-xr-x root/root etc/bash_completion.d/
|
||||||
-rw-r--r-- root/root etc/bash_completion.d/docker
|
-rw-r--r-- root/root etc/bash_completion.d/docker
|
||||||
|
-rw-r--r-- root/root etc/docker.conf
|
||||||
drwxr-xr-x root/root etc/rc.d/
|
drwxr-xr-x root/root etc/rc.d/
|
||||||
-rwxr-xr-x root/root etc/rc.d/docker
|
-rwxr-xr-x root/root etc/rc.d/docker
|
||||||
drwxr-xr-x root/root etc/udev/
|
drwxr-xr-x root/root etc/udev/
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
2767e2b5098dbf330b1fc08e2105207d docker-1.11.1.tar.xz
|
2767e2b5098dbf330b1fc08e2105207d docker-1.11.1.tar.xz
|
||||||
8c86c300b3e70144c10797deddf10911 docker-man-pages-1.11.1.tar.xz
|
8c86c300b3e70144c10797deddf10911 docker-man-pages-1.11.1.tar.xz
|
||||||
fc6ebe7d940298fc737ddb662bcd4219 docker.rc
|
639d3af72199001bb612e545335a67a3 docker.conf
|
||||||
|
a5958065f57184ef580fdf3a76d58a07 docker.rc
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
name=docker
|
name=docker
|
||||||
version=1.11.1
|
version=1.11.1
|
||||||
release=3
|
release=4
|
||||||
source=(http://jaeger.morpheus.net/linux/crux/files/$name-$version.tar.xz \
|
source=(http://jaeger.morpheus.net/linux/crux/files/$name-$version.tar.xz \
|
||||||
http://jaeger.morpheus.net/linux/crux/files/$name-man-pages-$version.tar.xz \
|
http://jaeger.morpheus.net/linux/crux/files/$name-man-pages-$version.tar.xz \
|
||||||
$name.rc)
|
$name.rc $name.conf)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
export AUTO_GOPATH=1
|
export AUTO_GOPATH=1
|
||||||
@ -26,6 +26,8 @@ build() {
|
|||||||
|
|
||||||
install -D -m 0755 $SRC/$name.rc \
|
install -D -m 0755 $SRC/$name.rc \
|
||||||
$PKG/etc/rc.d/$name
|
$PKG/etc/rc.d/$name
|
||||||
|
install -D -m 0644 $SRC/$name.conf \
|
||||||
|
$PKG/etc/$name.conf
|
||||||
|
|
||||||
ln -s containerd $PKG/usr/bin/docker-containerd
|
ln -s containerd $PKG/usr/bin/docker-containerd
|
||||||
ln -s containerd-shim $PKG/usr/bin/docker-containerd-shim
|
ln -s containerd-shim $PKG/usr/bin/docker-containerd-shim
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
Upgrade Notes for Docker 1.6.0
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Docker 1.6.0 introduced several new features.
|
|
||||||
|
|
||||||
.. see:: https://blog.docker.com/2015/04/docker-release-1-6/
|
|
||||||
|
|
||||||
No kernel changes required.
|
|
@ -1,53 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# /etc/rc.d/docker: start/stop docker daemon
|
|
||||||
#
|
|
||||||
|
|
||||||
SSD=/sbin/start-stop-daemon
|
|
||||||
PROG=/usr/bin/docker
|
|
||||||
PIDFILE=/var/run/docker.pid
|
|
||||||
LOGFILE=/var/log/docker.log
|
|
||||||
|
|
||||||
. /etc/docker.conf
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
start)
|
|
||||||
# Ensure ownership and permissiong of log file.
|
|
||||||
touch $LOGFILE
|
|
||||||
chgrp docker $LOGFILE
|
|
||||||
chown 640 $LOGFILE
|
|
||||||
|
|
||||||
# Ensure cgroups is properly mounted.
|
|
||||||
cgroupfs-mount
|
|
||||||
|
|
||||||
$SSD --start --background --make-pidfile --pidfile $PIDFILE --exec $PROG -- daemon $OPTS >> $LOGFILE 2>&1
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
$SSD --stop --retry 10 --pidfile $PIDFILE
|
|
||||||
|
|
||||||
# Unmount cgroups is
|
|
||||||
cgroupfs-umount
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
sleep 2
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
$SSD --stop --pidfile $PIDFILE --signal HUP
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
$SSD --status --pidfile $PIDFILE
|
|
||||||
case $? in
|
|
||||||
0) echo "$(basename $PROG) is running with pid $(cat $PID)" ;;
|
|
||||||
1) echo "$(basename $PROG) is not running but the pid file $PID exists" ;;
|
|
||||||
3) echo "$(basename $PROG) is not running" ;;
|
|
||||||
4) echo "Unable to determine the program status" ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "usage: $0 [start|stop|restart|reload|status]"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# End of file
|
|
@ -2,6 +2,4 @@
|
|||||||
#
|
#
|
||||||
# For configuration options see: docker daemon --help
|
# For configuration options see: docker daemon --help
|
||||||
|
|
||||||
OPTS=""
|
OPTS="-p /var/run/docker.pid -G docker"
|
||||||
|
|
||||||
# vim: syntax=sh
|
|
||||||
|
@ -6,12 +6,28 @@
|
|||||||
SSD=/sbin/start-stop-daemon
|
SSD=/sbin/start-stop-daemon
|
||||||
PROG=/usr/bin/docker
|
PROG=/usr/bin/docker
|
||||||
PID=/var/run/docker.pid
|
PID=/var/run/docker.pid
|
||||||
OPTS="-p $PID -G docker"
|
CONF=/etc/docker.conf
|
||||||
|
LOG=/var/log/docker.log
|
||||||
|
|
||||||
|
if [ -f $CONF ]; then
|
||||||
|
. $CONF
|
||||||
|
else
|
||||||
|
if [ -z $OPTS ]; then
|
||||||
|
OPTS="-p $PID -G docker"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
|
if [ ! -f $LOG ]; then
|
||||||
|
touch $LOG
|
||||||
|
chgrp docker $LOG
|
||||||
|
chmod 640 $LOG
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/bin/cgroupfs-mount
|
/usr/bin/cgroupfs-mount
|
||||||
$SSD --start --pidfile $PID --background --exec $PROG -- daemon $OPTS
|
|
||||||
|
$SSD --start --pidfile $PID --background --exec $PROG -- daemon $OPTS >> $LOG 2>&1
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
$SSD --stop --retry 10 --pidfile $PID
|
$SSD --stop --retry 10 --pidfile $PID
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# create docker group
|
|
||||||
getent group docker > /dev/null || groupadd -g 142 docker
|
|
Loading…
x
Reference in New Issue
Block a user