/docker-containers

Create multiple containers

Primary LanguageHTMLMIT LicenseMIT

Docker Multiple Containers

  • nginx from command line view

  • nginx from Dockerfile view

  • python from Dockerfile view

  • network container view

  • docker-compose example Nginx | Node | MongoDB | view

Node Container (From Dockerfile)

  • Dockerfile example Node | view

Create services with reverse proxy

  • run docker [frontend, backend, postgres] view

Apache Velocity and Ngnix

  • docker: html using apache velocity and server images with ngnix view

Commands

  • Inspect a specific config inside the Dockerfile. Show the label author Bruno Macedo <...>.
docker image inspect --format="{{index .Config.Labels \"maintainer\"}}" my-image
  • Remove all containers
docker rm $(docker ps -a -f status=exited -q)
  • Remove all images
docker image rm $(docker images -q)
  • Remove all volumes
docker volume rm $(docker volume ls -q)

Best practices for writing Dockerfiles follow

Just some reminders :

Run only one process in a container.
Never run a process as root in a container.
Never store data in a container, do it in a volume
Never store credentials in a container, do it in a volume
Keep your image up to date
Verify third-party container repositories
Use tool like docker-security-scanning
May the force be with you 🙏

License

This project is licensed under the MIT License - see the LICENSE file for details