FS#65458 - [Docker] systemd service creates sock in `/run` while docker wants it in `/var/run`

Attached to Project: Community Packages
Opened by Pellegrino Prevete (tallero) - Tuesday, 11 February 2020, 15:24 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 11 February 2020, 15:38 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Systemd service creates the "docker.sock" file in "/run/docker.sock", while docker wants it in "/var/run/docker.sock".
Possible workarounds/fixes are symlinking the first into the second or edit "ExecStart" line in "/usr/lib/systemd/system/docker.service" to specify the sock path (if I understood correctly one should replace "fd://" with "unix:///var/run/docker.sock"?).

Additional info:
* 19.03.5-1
* everything default I believe
* do not know of any upstream bug report

Steps to reproduce: (every command is root command)
- Install docker last year with 'pacman -S docker'
- Start it with 'systemctl start docker'
- Running 'docker info' will return:

[root@hostname run]# docker info
Client:
Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Tuesday, 11 February 2020, 15:38 GMT
Reason for closing:  Works for me
Comment by Eli Schwartz (eschwartz) - Tuesday, 11 February 2020, 15:38 GMT
/var/run is a symbolic link to /run, so this should work. (Note that it is created by /usr/lib/tmpfiles.d/var.conf, which is part of systemd -- make sure that it is properly set up!)

It does work on my system.

The systemd services are the ones upstream created, plus a manual backport of https://github.com/docker/docker-ce/commit/66b48fb029f67e7fe452bca272d6cffce805b707

Loading...