记录群晖 Docker 配置和重启.

最近在自建 Docker 镜像源和私有源,发现群晖的 Docker 配置与常规配置大有不同,因此记录。

首先是配置文件的不同,群晖的配置文件在:

1
2
3
4
5
6
7
8
$ # cat /var/packages/Docker/etc/dockerd.json
{
"data-root" : "/var/packages/Docker/var/docker",
"insecure-registries" : [ "..." ],
"log-driver" : "db",
"registry-mirrors" : [ "..." ],
"storage-driver" : "btrfs"
}

其次是重启的方法不同,重启 Docker 的命令为:

1
$ systemctl restart pkgctl-Docker.service

根据常规方法配置私有源和镜像源,重启后即可使用:

1
2
3
4
5
6
7
8
$ # docker login http://git.frytea.local:80
Username: songtianlun
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

参考文献