opensour.cc developers' network - quick start guides to bootstrap examples

(Perfect for people with a short attention span, needing to get work done!)

Network

DNS

Your very first attempt should be sudo service docker restart. Even as you try one of the steps below, guess what? SUDO SERVICE DOCKER RESTART!
Rebooting a misbehaving service (or device) solves far more problems than anyone would like to admit. m(

Please note: if you're using a firewall such as CSF, there's usually options for pre- and post- launching. On systems using CSF and Docker, it's strongly recommended to create /usr/local/csf/bin/csfpost.sh, make it executable, and include a line for restarting Docker. Example:

csfpost.sh
#!/usr/bin/env bash
service docker restart
  • Docker build "Could not resolve …" and pip ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known')) can generally be solved using 1 of the following solutions: 1) 2) 3) 4) 5)
    1. Use Command Line Argument
      • Add --dns 8.8.8.8 --dns 8.8.4.4 when you run Docker.
      • Sadly, this does not work for docker build
    2. Uncomment the following line in /etc/default/docker
      • DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
      • Restart the Docker service: sudo service docker restart
      • Delete any images which have cached the invalid DNS settings, or try Scorched Earth.
      • Build again and the problem should be solved.
    3. Temporary change: ${FCEDIT:-${VISUAL:-${EDITOR:-nano}}} /etc/resolv.conf and adding the following lines at the end:
      • # Google IPv4 nameservers
        nameserver 8.8.8.8
        nameserver 8.8.4.4
        • sudo service docker restart
    4. Permanent change: ${FCEDIT:-${VISUAL:-${EDITOR:-nano}}} /etc/dhcp/dhclient.conf
      • Uncomment and edit the line with prepend domain-name-server : prepend domain-name-servers 8.8.8.8, 8.8.4.4;
      • Restart dhclient : sudo dhclient

Scorched Earth

If all else fails, you could always go full-on Scorched Earth, and DESTROY EVERYTHING: docker kill $(docker ps --all --quiet --no-trunc); docker rm $(docker ps --all --quiet --no-trunc); docker rmi $(docker images --quiet --all)

Navigation
Table of Contents
Print/export