2 - Containerise REST API

Learning Outcomes

  • Learn about How to Dockerise an application.
  • Learn about Mutli-stage Dockerfile.
  • Learn about Dockerfile best practices.

Problem Statement

Create Dockerfile for the REST API.


The following expectations should be met to complete this milestone.
  • API should be run using the docker image.
  • Dockerfile should have different stages to build and run the API.
  • We should be able to inject environment variables while running the docker container at runtime.
  • README.md should be updated with proper instructions to build the image and run the docker container.
  • Similarly appropriate make targets should be added in the Makefile.
  • The docker image should be properly tagged using semver tagging, use of latest tag is heavily discouraged.
  • Appropriate measures should be taken to reduce docker image size. We want our images to have a small size footprint.

Further Reading