Skip to content

Repository files navigation

Dock the Right Way: Essential Docker Best Practices

This repository contains examples of how to use Docker to run applications in a production environment. The examples include a variety of languages and frameworks, and are designed to showcase best practices for deploying and managing Docker containers.

Getting Started

To get started with using Docker for your own applications, follow these steps:

  1. Install Docker on your local machine or server.
  2. Clone this repository to your local machine using git clone https://github.com/anuj-sadani-infrrd/docker_the_right_way.git
  3. Navigate to the folder containing the example you wish to run.
  4. Follow the instructions in the example's README file to build and run the Docker container.

Examples

This repository includes examples for Python, however it can be applied to other programming languages and frameworks:

  • Python/Flask (SpaCY model)

Each example includes a README file with detailed instructions on how to build and run the Docker container. Follow the step by step guide in the README

  1. Basic app
  2. Add some tests
  3. The first container
  4. Order Dockerfile Commands Appropriately
  5. Use explicit and deterministic Docker base image
  6. Minimize the Number of Layers
  7. Use multi stage build
  8. Add only required stuffs (use .dockerignore)
  9. Do not run container with root privilege

Contributing

If you would like to contribute to this repository, feel free to submit a pull request with your changes. We welcome contributions that improve the quality and usability of the examples.

License

This repository is licensed under the MIT License. Feel free to use and modify the code as needed.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages