app-emulation/containerd: Switch to default socket location

The upstream socket is under /run/containerd/containerd.sock which many
tools like crictl will use by default and diverging causes users to
always have to configure a non-default location.
Switch to the upstream default while still keeping a symlink so that
users are not forced to update their configurations they had to do for
the non-default location. This also keeps Docker using the old socket
location as an assertion that the symlink works. The state directory
is also switch to the default location.
This commit is contained in:
Kai Lüke 2021-01-11 12:09:41 +01:00
parent 58579a67e4
commit 8727d0fc62
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# persistent data location # persistent data location
root = "/var/lib/containerd" root = "/var/lib/containerd"
# runtime state information # runtime state information
state = "/run/docker/libcontainerd/containerd" state = "/run/containerd"
# set containerd as a subreaper on linux when it is not running as PID 1 # set containerd as a subreaper on linux when it is not running as PID 1
subreaper = true subreaper = true
# set containerd's OOM score # set containerd's OOM score
@ -10,7 +10,7 @@ disabled_plugins = []
# grpc configuration # grpc configuration
[grpc] [grpc]
address = "/run/docker/libcontainerd/docker-containerd.sock" address = "/run/containerd/containerd.sock"
# socket uid # socket uid
uid = 0 uid = 0
# socket gid # socket gid

View File

@ -6,6 +6,8 @@ After=network.target
[Service] [Service]
Delegate=yes Delegate=yes
Environment=CONTAINERD_CONFIG=/usr/share/containerd/config.toml Environment=CONTAINERD_CONFIG=/usr/share/containerd/config.toml
ExecStartPre=mkdir -p /run/docker/libcontainerd
ExecStartPre=ln -fs /run/containerd/containerd.sock /run/docker/libcontainerd/docker-containerd.sock
ExecStart=/usr/bin/containerd --config ${TORCX_UNPACKDIR}${TORCX_IMAGEDIR}${CONTAINERD_CONFIG} ExecStart=/usr/bin/containerd --config ${TORCX_UNPACKDIR}${TORCX_IMAGEDIR}${CONTAINERD_CONFIG}
KillMode=process KillMode=process
Restart=always Restart=always