1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/contrib
Eric Paris 053c3557b3 Fix system socket/service unit files
Two problems how they are today:

In the current systemd unit files it is impossible to have the
docker.service started at system boot.  Instead enableing docker.service
will actually enable docker.socket.  This is a problem, as that means
any container with --restart=always will not launch on reboot.  And of
course as soon as you log in and type docker ps, docker.service will be
launched and now your images are running.  Talk about a PITA to debug!
The fix is to just install docker.service when people ask docker.service
to be enabled.  If an admin wants to enable docker.socket instead, that
is fine and will work just as it does today.

The second problem is a common docker devel workflow, although not
something normal admins would hit.  In this case consider a dev doing
the following:

systemctl stop docker.service

docker -d
[run commands]
[^C]

systemctl start docker.service

Running docker -d (without -F fd://) will clean up the
/var/run/docker.sock when it exits.  Remember, you just ran the docker
daemon not telling it about socket actviation, so cleaning up its socket
makes sense!  The new docker, started by systemd will expect socket
activation, but the last one cleaned up the docker.sock.  So things are
just broken.  You can, today, work around this by restarting
docker.socket.  This fixes it by telling docker.socket that it is
PartOf=docker.service.  So when docker.service is
started/stopped/restarted docker.socket will also be
started/stopped/restarted.  So the above semi-common devel workflow will
be fine.  When docker.service is stopped, so is docker.socket,   docker
-d (without -F fd://) will create and delete /var/run/docker.sock.
Starting docker.service again will restart docker.socket, which will
create the file an all is happy in the word.

Signed-off-by: Eric Paris <eparis@redhat.com>
2014-10-07 14:09:08 -04:00
..
completion Merge pull request #8364 from tianon/bash-completion-filters 2014-10-02 15:00:01 -07:00
desktop-integration Standardize "apt-get install" usage across the repo 2014-07-28 17:41:59 -06:00
docker-device-tool update go import path and libcontainer 2014-07-24 22:19:50 +00:00
host-integration update go import path and libcontainer 2014-07-24 22:19:50 +00:00
init Fix system socket/service unit files 2014-10-07 14:09:08 -04:00
mkimage Fix contrib/mkimage/debootstrap for Lucid 2014-08-12 15:37:42 -06:00
syntax Added Syntax highlighting file for the KDE Kate Editor 2014-08-27 11:16:51 -07:00
udev Add udev rules files for hiding the docker loopback devices from udisks 2013-12-02 09:11:06 -07:00
vagrant-docker IANA allocated Docker port: 2375 2014-06-04 06:54:19 +10:00
check-config.sh It seems that we need these 2 options enabled for both aufs and devicemapper drivers when running on EXT4 - so test for them 2014-09-17 17:03:58 +10:00
MAINTAINERS Remove @KSid from contrib maintainers for now 2013-10-15 00:58:34 -06:00
mkimage-alpine.sh Standardize "curl" arguments across the repo to be or include "-sSL" 2014-07-07 10:35:38 -06:00
mkimage-arch-pacman.conf mkimage-arch: provide and use own pacman.conf 2014-01-21 14:22:56 +01:00
mkimage-arch.sh Fix expect script in mkimage-arch 2014-07-10 02:09:50 +02:00
mkimage-busybox.sh mkimage: use /var/tmp by default instead of /tmp 2014-06-27 14:43:12 +02:00
mkimage-crux.sh mkimage: use /var/tmp by default instead of /tmp 2014-06-27 14:43:12 +02:00
mkimage-debootstrap.sh update go import path and libcontainer 2014-07-24 22:19:50 +00:00
mkimage-rinse.sh mkimage: use /var/tmp by default instead of /tmp 2014-06-27 14:43:12 +02:00
mkimage-unittest.sh mkimage: use /var/tmp by default instead of /tmp 2014-06-27 14:43:12 +02:00
mkimage-yum.sh mkdir /dev before doing mknod 2014-03-02 14:50:16 +00:00
mkimage.sh fix help message for mkimage debootstrap with components 2014-10-01 23:18:23 +02:00
mkseccomp.pl Update to double-dash everywhere 2014-03-13 11:46:02 -06:00
mkseccomp.sample added capabilities needed by new sysinit 2014-01-14 19:27:31 +01:00
nuke-graph-directory.sh Add contrib/nuke-graph-directory.sh script to clean out old /var/lib/docker directories much more easily 2014-08-05 12:36:39 -06:00
README Add contrib/ directory, README, and script to create a basic busybox image 2013-03-14 03:16:42 +00:00

The `contrib` directory contains scripts, images, and other helpful things
which are not part of the core docker distribution. Please note that they
could be out of date, since they do not receive the same attention as the
rest of the repository.