docker service update --image portainer/portainer:latest portainer_portainer
然后重启portainer服务
docker service upadte 命令参数详解
--force 强制更新重启服务,无论是否配置或镜像改变都更新
--image <image:tag> 制定更新的镜像
--with-registry-auth 私有仓库需要携带该参数,否则提示
1 2 3
image 192.168.1.230:14005/manage/test/ygl/app:latest could not be accessed on a registry to record its digest. Each node will access 192.168.1.230:14005/manage/test/ygl/app:latest independently, possibly leading to different nodes running different
vim /usr/lib/systemd/system/dropbox.service添加一个用户登陆后启动的服务
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
[Unit] Description=Dropbox as a system service user
[Service] Type=forking ExecStart=/usr/bin/dropbox start ExecStop=/usr/bin/dropbox stop User=nobody Group=nobody # 'LANG' might be unnecessary, since systemd already sets the # locale for all services according to "/etc/locale.conf". # Run `systemctl show-environment` to make sure. #Environment=LANG=en_US.utf-8