Fix cannot access internet in your docker container

I use docker for testing environment. Somehow I found out that the docker container cannot access the internet and the solution is really simple: $ sudo ifconfig docker0 down $ sudo service docker restart $ sudo ifconfig docker0 up Or $ sudo vim /etc/default/docker DOCKER_OPTS=”–dns 10.10.4.14 –dns 8.8.8.8 –dns 8.8.4.4″ Which: 10.10.4.14 in my localhost/laptop

Setup docker + jenkins + nginx

Let’s setup jenkins with docker with local url : jenkins.local First, add local url to /etc/hosts $ sudo echo -e “127.0.0.1\tjenkins.local” >> /etc/hosts Install docker and pull newest jenkins image $ sudo apt-get install docker.io $ sudo docker pull jenkins $ sudo docker run -itd –name jenkins –publish 8080:8080 –publish 50000:50000 jenkins Setup nginx $ … Read more