How to solve the problem of docker push image failure

藏色散人
Release: 2021-12-08 16:50:35
Original
5746 people have browsed it

Solution to docker push image failure: 1. Add "{"insecure-registries":["hub.xxxxx.com"]}"; 2. Execute "docker login $your mirror site".

How to solve the problem of docker push image failure

The operating environment of this article: ubuntu 16.04 system, Docker version 20.10.11, Dell G3 computer.

How to solve the problem of docker push image failure?

Docker image creation and push image error problem

docker build error

Got permission denied while trying to connect to the 
Docker daemon socket at unix:///var/run/docker.sock: 
Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=
&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerf
ile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=ntdlgho4p5wt
906yywzo9pcdd&shmsize=0&t=gamehall%3Av1.6.38&target=&ulimits=null&version=1: dial 
unix /var/run/docker.sock: connect: permission denied
Copy after login

Solution:

gpasswd -    #测试docker命令是否可以使用
Copy after login

docker push error

Error 1:

Get https://hub.xxx.com/v1/_ping: dial tcp 192.168.1.8:443: getsockopt: connection refused
Copy after login

Solution:

vim /etc/docker/daemon.json   添加 { "insecure-registries":["hub.xxxxx.com"] }
Copy after login

Restart docker

systemctl restart docker
systemctl restart docker.service
Copy after login

Error 2:

denied: requested access to the resource is denied
Copy after login

Solution

docker login $你的镜像站点
Copy after login

Recommended learning: "Docker Video Tutorial"

The above is the detailed content of How to solve the problem of docker push image failure. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template