Docker hints

Mostly about Dockerfile

Dockerfile tips

To make python (and probably others) locale dependent applications working:

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8

To switch debconf into noninteractive mode:

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update
RUN apt-get install ....
RUN apt-get clean
RUN echo 'debconf debconf/frontend select Dialog' | debconf-set-selections

Docker has some issue with removing broken images and this link was helpful:

docker rm $(docker ps -a | grep -v "CONTAINER" | awk {'print $1'})
docker rmi $(docker images -qf "dangling=true")