aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-04-29 09:51:45 +0200
committerGravatar Christopher Baklid <[email protected]>2018-04-29 09:51:45 +0200
commit916b58096eeec63f4dc594e89432259e3b63e908 (patch)
treee6e37f3031e9a5337e5db02ea0f5db2647463e5f
parentreadd .git folder to docker container, dependency for command (diff)
preinstall environment in the base container
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile1
-rw-r--r--Dockerfile.base13
3 files changed, 15 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
index d19421454..8532bbd6d 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -11,3 +11,4 @@ Vagrantfile
.coveragerc
.gitignore
.travis.yml
+*.log
diff --git a/Dockerfile b/Dockerfile
index cf53d2fb9..5928e4f07 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,6 +10,7 @@ RUN pip install pipenv
COPY . /bot
WORKDIR /bot
+RUN pipenv clean
RUN pipenv sync
ENTRYPOINT ["/sbin/tini", "--"]
diff --git a/Dockerfile.base b/Dockerfile.base
index b74be598e..32d017540 100644
--- a/Dockerfile.base
+++ b/Dockerfile.base
@@ -3,5 +3,18 @@ FROM python:3.6-alpine
RUN apk add --update tini
RUN apk add --update build-base
RUN apk add --update libffi-dev
+RUN pip install pipenv
+
+RUN mkdir /bot
+COPY Pipfile /bot
+COPY Pipfile.lock /bot
+WORKDIR /bot
+
+ENV PIPENV_VENV_IN_PROJECT=1
+ENV PIPENV_IGNORE_VIRTUALENVS=1
+ENV PIPENV_NOSPIN=1
+ENV PIPENV_HIDE_EMOJIS=1
+
+RUN pipenv install
# usage: FROM pythondiscord/bot-base:latest