The following are two useful tips that might save you a lot of trouble later on. The first shows how to give the docker client non-root access, and the second shows how to configure the Ubuntu firewall rules to enable forwarding network traffic.
You do not need to follow these if you are using Boot2Docker.
Create a group called
docker and add your user to that group to avoid having to add the
sudo prefix to every
docker command. The reason you need to run a
docker command with the
sudo prefix by default is that the
docker daemon needs to run with
root privileges, but the docker client (the commands you run) doesn't. So, by creating a
docker group, you can run all the client commands without using the
sudo prefix, ...