Docker Build Tidbits

Freeing space in docker build machine

#Prune everything. This works well and frees your disk spaces
docker system prune

#following are few other pruning commands
docker image prune
docker image prune -a
docker container prune



Docker Build Issues and resolutions

When you want to remove folder or file in Docker, you need to remove in separate RUN command.

However, there is not a easy way to remove a directory or file in docker

Docker how to setup sudo

chmod u+w /etc/sudoers
echo "ALL          ALL = {ALL}  NOPASSWD:   ALL">>/etc/sudoerss

Useful Docker Commands

docker ps --filter status=running

References