8000 feat(*): use deis/base and update tools and docs by mboersma · Pull Request #11 · deis/docker-python-dev · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ script: make build
deploy:
provider: script
script: _scripts/ci/deploy.sh
on:
tags: true
55 changes: 52 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
# docker-python-dev
[![Build Status](https://travis-ci.org/deis/docker-python-dev.svg?branch=master)](https://travis-ci.org/deis/docker-python-dev)
# deis/python-dev

A containerized development environment to support building Python-based Deis v2 components http://deis.com
[![Build Status](https://travis-ci.org/deis/docker-python-dev.svg?branch=master)](https://travis-ci.org/deis/docker-python-dev) [![Docker Repository on Quay](https://quay.io/repository/deis/python-dev/status "Docker Repository on Quay")](https://quay.io/repository/deis/python-dev)

A [Python 3][] language development toolbox.

Some [Deis Workflow][] components use this Docker image as a standard build and test environment,
but it is intended to be useful to any Python developer. Please help make deis/python-dev better by
creating [issues][] and submitting [pull requests][].

## Image Contents

* [codecov][]: uploader for codecov.io coverage reports
* [coverage][]: measures code coverage for Python programs
* [flake8][]: modular source code linter, including pep8, pyflakes and mccabe
* [Python 3.5.2][Python 3]

## Usage

Mount your local Python code into the container to run one of the included tools or scripts.
Here's an example of running `flake8` for deis/dockerbuilder:

```console
$ docker run --rm \
--volume `pwd`/rootfs:/app \
--workdir /app \
quay.io/deis/python-dev:latest \
flake8 --show-source --config=setup.cfg .
```

The latest deis/python-dev Docker image is available at:

* [Quay.io][]
```
docker pull quay.io/deis/python-dev
```

* [Docker Hub][]
```
docker pull deis/python-dev
```

[Python 3]: https://docs.python.org/3.5/
[Deis Workflow]: https://deis.com/
[Docker Hub]: https://hub.docker.com
[issues]: https://github.com/deis/docker-python-dev/issues
[jq]: https://stedolan.github.io/jq/
[pull requests]: https://github.com/deis/docker-python-dev/pulls
[codecov]: https://codecov.io/
[coverage]: https://coverage.readthedocs.io
[flake8]: https://gitlab.com/pycqa/flake8
[Quay.io]: https://quay.io
[shellcheck]: https://github.com/koalaman/shellcheck
1 change: 0 additions & 1 deletion _scripts/ci/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash


docker login -e "$DOCKER_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
REGISTRY="" make push
docker login -e "$QUAY_EMAIL" -u "$QUAY_USER" -p "$QUAY_PASSWORD" quay.io
Expand Down
14 changes: 8 additions & 6 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM python:3.5-alpine
FROM quay.io/deis/base:v0.3.6

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-pip

COPY . /

RUN pip3 install --disable-pip-version-check --no-cache-dir -r dev_requirements.txt

RUN pip install \
coverage==4.0.3 \
codecov==1.6.3 \
flake8==2.5.4 \
requests-mock==0.7.0
3 changes: 3 additions & 0 deletions rootfs/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
codecov==2.0.5
coverage==4.3.4
flake8==3.3.0
0