[Systems] Wiki spam

Bernie Innocenti bernie at codewiz.org
Wed Dec 9 13:41:54 EST 2015


On 12/08/2015 12:25 AM, Samuel Cantero wrote:
> You can't delete images when the partition is full. Apparently, docker
> creates a tmp folder inside its partition when executing remove, so it
> wasn't possible. I had to remove it manually. Also, it is not possible
> to use rm. You must use btrfs subvolume.
> 
> Sometimes Docker doesn't allow you to remove containers with snapshots.
> So, I've written this little script to remove all the snapshots related
> to a container ID.
> 
> sudo btrfs subvol list -ao /var/lib/docker | grep DOCKER_CONTAINER_ID |
> awk '{ print $9 }' | sort -r | while read vol; do echo "sudo btrfs
> subvolume delete $vol"; done | bash -x
> 
> After removing all the snapshots and the container disks, you can
> execute docker rm -v container. It is important to delete a container
> using the -v parameter. By default, docker doesn't remove the volumes
> associated with a container. By executing rm with -v, all the volumes
> associated with the container are also removed. If we don't do this, we
> are leaving a lot of orphan disks and snapshots.
> 
> I removed some containers to put back online the parsoid container, but
> I couldn't start it. I built and started it again but no success. There
> is an error in the log associated with a node.js module. Sam have you
> done some update? In case you didn't, I guess that the parsoid git repo
> (inside the dockerfile) probably has been changed.

Your docker-fu has become very strong indeed, Sam-sensei :-)

Could you please create a wiki page containing your recipes and best
practices for image management?

-- 
 _ // Bernie Innocenti
 \X/  http://codewiz.org


More information about the Systems mailing list