Skip to content

Instantly share code, notes, and snippets.

@vmrob
Created February 9, 2019 22:38
Show Gist options
  • Save vmrob/de2c5567eac7a3f5b6cfa62a1e4a4267 to your computer and use it in GitHub Desktop.
Save vmrob/de2c5567eac7a3f5b6cfa62a1e4a4267 to your computer and use it in GitHub Desktop.
Python docker template
version: '3'
services:
runner:
build:
context: .
dockerfile: Dockerfile
FROM python:3-alpine
COPY entrypoint.py /app/entrypoint.py
WORKDIR /app
ENTRYPOINT ["python3", "/app/entrypoint.py"]
#!/usr/bin/env python3
print('hello world!')
build:
docker-compose build
run:
docker-compose up
stop:
docker-compose stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment