21 lines
569 B
SYSTEMD
21 lines
569 B
SYSTEMD
# Github仓库示例地址: https://github.com/moby/moby/blob/master/contrib/init/systemd/docker.socket
|
|
# 文件位置: /usr/lib/systemd/system/docker.socket
|
|
|
|
[Unit]
|
|
Description=Docker Socket for the API
|
|
|
|
[Socket]
|
|
# If /var/run is not implemented as a symlink to /run, you may need to
|
|
# specify ListenStream=/var/run/docker.sock instead.
|
|
ListenStream=/run/docker.sock
|
|
SocketMode=0660
|
|
SocketUser=root
|
|
SocketGroup=docker
|
|
|
|
[Install]
|
|
WantedBy=sockets.target
|
|
|
|
[Install]
|
|
# 这表示你希望你的单元(unit)随着 socket 相关的单元一起启动
|
|
WantedBy=sockets.target
|