Skip to content

Instantly share code, notes, and snippets.

@sethbergman
Created January 5, 2016 03:55
Show Gist options
  • Save sethbergman/5f31645918ae0eb4bdca to your computer and use it in GitHub Desktop.
Save sethbergman/5f31645918ae0eb4bdca to your computer and use it in GitHub Desktop.
Python + Drone + Docker publish
cache:
mount:
- wheeldir
build:
image: python:2.7.11
commands:
- pip wheel -r requirements.txt --wheel-dir=wheeldir --find-links=wheeldir
- pip install --use-wheel --no-index --find-links=wheeldir -r requirements.txt
- nosetests -v test/
publish:
docker:
registry: quay.io
username: $$QUAY_USERNAME
password: $$QUAY_PASSWORD
email: [email protected]
repo: myrepo/my-image
tag: $$TAG
file: Dockerfile
when:
event: tag
FROM python:2.7.11
COPY wheeldir /app/wheeldir
COPY requirements.txt /app/
RUN pip install --use-wheel --no-index --find-links=/app/wheeldir -r /app/requirements.txt
COPY . /app/
WORKDIR /app/
RUN python setup.py install
CMD your-script.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment