What is context: . in docker-compose?

  docker, docker-compose

I am trying learn docker and created my first docker compose file. Basically I am trying to create a Django web microservice and use docker compose file to manage it. Here is my code for my docker-compose.yml:

version: "3"

services:
  app:
    build:
      context: .
    ports:
      - "8000:8000"
    volumes:
      - ./app:/app
    command: >
      sh -c "py manage.py runserver 0.0.0.0:8000"

I don’t understand the use of context: . Can someone please explain me this

Source: Docker Questions

LEAVE A COMMENT