Skip to content

Commit

Permalink
Reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmartinspt committed Oct 21, 2019
1 parent 4a88823 commit 6c22c63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .dockerignore
@@ -1,11 +1,22 @@
# Don't include caches, logs and documentation
cache.sqlite
*.log
.circleci
.codecov
.git
.github
.gitignore
.vscode
cache.sqlite
README.md
HACKING.md

# The run script isn't needed
run
.docker-project

# Environemnt
.env
.env.local

# Node is only needed for building, not running
package.json
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Expand Up @@ -5,15 +5,14 @@ ENV LANG C.UTF-8
WORKDIR /srv

# System dependencies
RUN apt-get update && apt-get install --yes python3-pip libsodium-dev
RUN apt-get update && apt-get install --no-install-recommends --yes python3 python3-setuptools python3-pip libsodium-dev

# Import code, install code dependencies
ADD . .
RUN pip3 install -r requirements.txt
RUN python3 -m pip install --no-cache-dir -r requirements.txt

# Set git commit ID
ARG COMMIT_ID
RUN test -n "${COMMIT_ID}"
RUN echo "${COMMIT_ID}" > version-info.txt
ENV COMMIT_ID "${COMMIT_ID}"

Expand Down

0 comments on commit 6c22c63

Please sign in to comment.