Skip to content

Commit

Permalink
Reorganise Dockerfile for slimmer image
Browse files Browse the repository at this point in the history
  • Loading branch information
brew committed Nov 15, 2018
1 parent f638276 commit 8b16bde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
.cache
.pytest_cache
*.egg-info/
repos/

tests/sample_data/.dpp
tests/sample_data/.cache
tests/sample_data/denormalized/
tests/sample_data/normalized/
tests/sample_data/final/
tests/sample_data/*.zip
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
FROM python:3.6-alpine

RUN apk --no-cache add \
python3 \
git \
RUN apk add --no-cache \
libpq \
wget \
ca-certificates \
python3-dev \
postgresql-dev \
build-base \
libxml2-dev \
libxslt-dev \
libstdc++ \
bash \
curl
RUN update-ca-certificates

WORKDIR /app
ADD requirements.txt .
RUN pip install -r requirements.txt

# ADD repos/os-api-cache repos/os-api-cache
# RUN pip install -e repos/os-api-cache
ADD requirements.txt .

# ADD repos/os-package-registry repos/os-package-registry
# RUN pip install -e repos/os-package-registry
RUN apk add --no-cache --virtual .build-deps \
git \
build-base \
ca-certificates \
&& update-ca-certificates \
&& pip install -r requirements.txt \
&& apk del --no-cache .build-deps

COPY docker/entrypoint.sh /entrypoint.sh

Expand Down

0 comments on commit 8b16bde

Please sign in to comment.