1、本例是在 Jenkins 里面远程发布的机器上报错,这里用的 devops 这个账号

ssh devops@10.3.0.203 docker pull 10.3.0.203:5001/gateway-api-dev

Error response from daemon: Get http://10.3.0.203:5001/v2/fms-base-service-local/manifests/latest: no basic auth credentials

解决方法:

先登陆到这个用户下,然后登陆仓库 docker login http://10.3.0.203:5001

2、docker 安装的 mysql 备份

docker exec mysql3308 bash -c 'exec mysqldump -uroot -p!root123 \
--set-gtid-purged=OFF nacos_config | gzip' > /opt/backup/mysql/nacos_$(date +%Y%m%d).sql.gz

3、把普通用户 加入 docker

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

# 加入 docker 组
gpasswd -a kenny docker

# 查看

[root@rm ~]# id kenny
uid=1001(kenny) gid=1001(kenny) groups=1001(kenny),994(docker)

[root@rm ~]# groups kenny
kenny : kenny docker

4、docker 网络占用

docker: Error response from daemon: endpoint with name contract-generate-service already exists in network bridge.

# 删除容器
docker rm -f contract-generate-service

# 清理网络占用
docker network disconnect --force bridge contract-generate-service

# 查看
docker network inspect bridge

5、docker 在运行的时候没有设置开机自启

# 设置开机自启
docker container update --restart=always nacos

# 取消开机自启
docker container update --restart=no nacos