Dockercloud-agent error: …Error creating default \”bridge\” network:…

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

When trying to use the dockercloud-agent with docker you have the following error in the /var/log/dockercloud/agent.log

Solution

If you remove the file var/lib/docker/network/files/local-kv.db as suggested here, then if you look again at the log files, it should be a message that the docker daemon has been started:

Clearing unused (dangling) docker volumes

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

After you start using and building Docker images, there is a case that there is a lot of space used even after deleting images and containers (a few GB maybe).

Solution

To clean out the volumes that are no longer used (ie dangling) use the following:

Removing Docker containers that have exited

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You would like to clear Docker containers that have been exited and not cleared properly.

Solution

Run the following to find out the containers that have exited and remove them.

Error response from daemon: conflict: unable to delete xxx (must be forced) – image is referenced in one or more repositories

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

Trying to remove some unused docker images that you no longer use with docker rmi image_id you get the following error message:

Solution

Use the following to delete multiple images (ie ubuntu):

Mentioned here