diff options
author | 2018-04-30 16:05:37 +0200 | |
---|---|---|
committer | 2018-04-30 16:05:37 +0200 | |
commit | df0fcb5a83c22c4914437060bbe395b5724ef9ad (patch) | |
tree | 5ff16c97470282b29b2a6adce367df6c29171736 /docker | |
parent | Critical fix: python parsing broken with previous merge. This should fix it, ... (diff) |
restructure docker files
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 17 | ||||
-rw-r--r-- | docker/Dockerfile.base | 20 |
2 files changed, 37 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..350e38ec0 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,17 @@ +FROM pythondiscord/bot-base:latest + +ENV PIPENV_VENV_IN_PROJECT=1 +ENV PIPENV_IGNORE_VIRTUALENVS=1 +ENV PIPENV_NOSPIN=1 +ENV PIPENV_HIDE_EMOJIS=1 + +RUN pip install pipenv + +COPY . /bot +WORKDIR /bot + +RUN pipenv clean +RUN pipenv sync + +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["pipenv", "run", "start"] diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base new file mode 100644 index 000000000..32d017540 --- /dev/null +++ b/docker/Dockerfile.base @@ -0,0 +1,20 @@ +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 |