Skip to content

Instantly share code, notes, and snippets.

View Dockerfile
#(FROM python:3 is parent of WORKDIR /app i.e below instruction)
FROM python:3
#(WORKDIR /app is child of FROM python:3 i.e. above instruction)
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
RUN chmod +x /app/start.sh
ENTRYPOINT ["/bin/bash", "/app/start.sh"]
View Dockerfile
FROM python:3
WORKDIR /app
COPY . .
RUN mkdir dummy && cd dummy && touch a.txt
View docker-compose.yaml
services:
web:
build: .
volumes:
- sample_volume/:/app/dummy/
volumes:
sample_volume:
external: true