2021年1月7日星期四

What is context: . in 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

https://stackoverflow.com/questions/65622477/what-is-context-in-docker-compose January 08, 2021 at 10:06AM

没有评论:

发表评论