如何授权docker所以docker拉可以得到一个systemd服务内的私人图像?

我想让docker把我的私有镜像拉到systemd服务里面,所以我通过logincore用户的shell来docker authorize ,运行docker authorize 。 但是,我可以看到,当systemd启动服务和调用泊坞窗,它没有被授权,所以它不能find我的私人图像。

什么是正确的方式来授权docker,因此它可以拉动私人图像由systemd执行时?

看看https://coreos.com/docs/launching-containers/building/registry-authentication/

您需要1.使用cloudconfig将dockercfg拖放到磁盘上,2.告诉您的设备以核心用户身份运行。