What is the recommended approach for creating Docker images?
I have been experimenting with Docker and reading articles on it. I was wondering what are best practices for building Docker images. Many articles have recommended that use Alpine base images because they&#x27;re small and more secure. And they also recommended that it should be one container per service.<p>Let us say that my application needed Postgre. What is the best approach?<p>1. Use the Alpine Dockerfile provided [here](https:&#x2F;&#x2F;github.com&#x2F;docker-library&#x2F;postgres&#x2F;blob&#x2F;master&#x2F;10&#x2F;alpine&#x2F;Dockerfile) at Github. Download the file and go to where its located in my terminal and enter <i>&quot;docker build&quot;</i><p>2. Creating a Dockerfile from scratch and using the command <i>&quot;FROM postgre:10-alpine&quot;</i><p>3. Use the Alpine template file provided [here](https:&#x2F;&#x2F;github.com&#x2F;docker-library&#x2F;postgres&#x2F;blob&#x2F;master&#x2F;Dockerfile-alpine.template)