Tips about docker container

Ref : http://developerblog.redhat.com/2016/02/24/10-things-to-avoid-in-docker-containers/

My attentions is following:

4) Don’t use a single layer image — To make effective use of the layered filesystem, always create your own base image layer for your OS, another layer for the username definition, another layer for the runtime installation, another layer for the configuration, and finally another layer for your application. It will be easier to recreate, manage, and distribute your image.

9) Don’t run processes as a root user — “By default docker containers run as root. (…) As docker matures, more secure default options may become available. For now, requiring root is dangerous for others and may not be available in all environments. Your image should use the USER instruction to specify a non-root user for containers to run as”. (From Guidance for Docker Image Authors)