Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Merge pull request #92 from caduvieira/master
Browse files Browse the repository at this point in the history
Generate a smaller docker image
  • Loading branch information
anaschwendler committed Oct 30, 2017
2 parents c599dc7 + 753a6af commit 49c069d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
38 changes: 21 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
FROM python:3.5.4-jessie

USER root

RUN apt-get update && apt-get install apt-transport-https -y

RUN apt-get install -y \
build-essential \
libxml2-dev \
libxslt1-dev \
python3-dev \
unzip \
zlib1g-dev

RUN pip install --upgrade pip
FROM python:3.6-slim

COPY requirements.txt ./
COPY setup ./
COPY rosie.py ./
COPY rosie ./rosie
COPY config.ini.example ./

RUN ./setup
RUN apt-get update \
&& apt-get install apt-transport-https -y --no-install-recommends \
build-essential \
libxml2-dev \
libxslt1-dev \
python3-dev \
unzip \
zlib1g-dev \
&& pip install --upgrade pip \
&& ./setup \
&& apt-get purge -y --auto-remove apt-transport-https \
build-essential \
libxml2-dev \
libxslt1-dev \
python3-dev \
zlib1g-dev \
&& rm -r /var/lib/apt/lists/* \
&& rm -Rf /root/.cache/pip


CMD python rosie.py run
ENTRYPOINT ["python", "rosie.py"]
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ A Python application reading receipts from the [Quota for Exercising Parliamenta

```console
$ docker build -t rosie .
$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data rosie

$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data rosie run <module_name>
```

Then check your `/tmp/serenata-data/` directory in you host machine for `irregularities.xz`.

For testing

```console
$ docker build -t rosie .
$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data rosie test
```

### Without Docker

#### Setup
Expand Down

0 comments on commit 49c069d

Please sign in to comment.