Solution
FROM python:3.8
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD [ "python", "./app.py" ]
version: '3'
services:
helloworld:
build: ./
ports:
- "5000:5000"
volumes:
- ./:/usr/src/app
docker-compose exec helloworld sh