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’re small and more secure.
Let us say that my application needed Postgre. What is the best approach?
Use the Alpine Dockerfile provided here at Github. Download the file and go to where its located in my terminal and enter “docker build”
Creating a Dockerfile from scratch and using the command “FROM postgre:10-alpine”