Docker Errors and Solutions

March 27, 2018




Error 1


docker run -d -p 9090:8080 -p 50009:50000 jenkins
fcf03901a73e536dc984ffef6e3c7d718636c72a2b64f06c93a0ce6b96d5811e
docker: Error response from daemon: driver failed programming external connectivity on endpoint thirsty_carson (4c03860982d783952e3cebc679247f8858e4f082d94e678b513eda8c0b74ba2c): iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 50009 -j DNAT --to-destination 172.17.0.6:50000 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1).
        
        
Solution 1 - To fix it by reinstall docker-engine

$ apt-get remove docker-engine OR 
$ yum remove docker-engine
$ apt-get install docker-engine OR 
$ yum install docker-engine

         
Solution 2
$ sudo systemctl restart docker
Solution 3
$ iptables -t filter -N DOCKER
Solution 4

$ sudo systemctl stop firewalld
$ sudo systemctl disable firewalld
$ sudo reboot
       
Solution 5

$ ip link delete docker0
$ systemctl restart docker
        

Error 2


I got the below error while pulling the scratch image.
$ docker pull scratch
Using default tag: latest
Error response from daemon: 'scratch' is a reserved name
        
        
Solution
An explicitly empty image, especially for building images "FROM scratch"
This image is most useful in the context of building base images (such as debian and busybox) or super minimal images (that contain only a single binary and whatever it requires, such as hello-world).
As of Docker 1.5.0 (specifically, docker/docker#8827), FROM scratch is a no-op in the Dockerfile, and will not create an extra layer in your image (so a previously 2-layer image will be a 1-layer image instead).
While scratch appears in Docker’s repository on the hub, you can’t pull it, run it, or tag any image with the name scratch. Instead, you can refer to it in your Dockerfile.
Docker version 1.8.1, build d12ea79 onwards, I can no longer pull or use scratch

No comments:

Powered by Blogger.