Docker Q&A

https://www.notion.so/Docker-Q-A-5c764a4b5ac745258c16d83dc576d831

IPv4 forwarding is disabled. Networking will not work

Solution 1: This won’t work every time

1
2
3
// run on host server
sysctl -w net.ipv4.ip_forward=1
sudo systemctl restart network

Solution 2: Append net.ipv4.ip_forward=1 to /etc/sysctl.conf file.

Solution 3: Append parameter —net=host to docker run, that will use host ports and ignore the -p parameters for example:

1
docker run -it --network host –name mynginx nginx

/var/jenkins_home/copy_reference_file.log Permission denied

$ docker run -ti -p 8080:8080 -p 50000:50000 -v /opt/jenkins:/var/jenkins_home jenkins touch: cannot touch ‘/var/jenkins_home/copy_reference_file.log’: Permission denied Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?

If you meet the above error, please figure out your volume mapping permissions.

1
sudo chown -R 1000:1000 /opt/jenkins
This post is licensed under CC BY 4.0 by the author.