From 715d1e32eda88c763b5ba411bcbdf16f97b8296a Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 16 Nov 2018 19:18:38 +0000 Subject: Attempt to make pipenv faster --- docker/bot.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index 4713e1f0e..ec2636423 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -8,7 +8,7 @@ ENV PIPENV_HIDE_EMOJIS=1 COPY . /bot WORKDIR /bot -RUN pipenv install --deploy --system +RUN pipenv sync --deploy --system ENTRYPOINT ["/sbin/tini", "--"] CMD ["python", "-m", "bot"] -- cgit v1.2.3 From f137b14a7d0026e9d653af126b77e1499bbb0173 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 16 Nov 2018 19:25:54 +0000 Subject: Sync doesn't have --deploy --- docker/bot.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index ec2636423..362a19617 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -8,7 +8,7 @@ ENV PIPENV_HIDE_EMOJIS=1 COPY . /bot WORKDIR /bot -RUN pipenv sync --deploy --system +RUN pipenv sync --system ENTRYPOINT ["/sbin/tini", "--"] CMD ["python", "-m", "bot"] -- cgit v1.2.3 From 7787111068fb50159be1a93865133a21df2ab916 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 16 Nov 2018 19:33:19 +0000 Subject: Pipenv: Back to install, add PIPENV_SKIP_LOCK --- docker/bot.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index 362a19617..b85550e67 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -4,11 +4,12 @@ ENV PIPENV_VENV_IN_PROJECT=1 ENV PIPENV_IGNORE_VIRTUALENVS=1 ENV PIPENV_NOSPIN=1 ENV PIPENV_HIDE_EMOJIS=1 +ENV PIPENV_SKIP_LOCK=1 COPY . /bot WORKDIR /bot -RUN pipenv sync --system +RUN pipenv install --deploy --system ENTRYPOINT ["/sbin/tini", "--"] CMD ["python", "-m", "bot"] -- cgit v1.2.3 From 36ca5e81ba46924f5b18a68e89d977019af4ac27 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 16 Nov 2018 21:55:50 +0000 Subject: Skipping the lock operation makes pipenv slower somehow. Don't ask me why. --- docker/bot.Dockerfile | 1 - 1 file changed, 1 deletion(-) (limited to 'docker') diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index b85550e67..4713e1f0e 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -4,7 +4,6 @@ ENV PIPENV_VENV_IN_PROJECT=1 ENV PIPENV_IGNORE_VIRTUALENVS=1 ENV PIPENV_NOSPIN=1 ENV PIPENV_HIDE_EMOJIS=1 -ENV PIPENV_SKIP_LOCK=1 COPY . /bot WORKDIR /bot -- cgit v1.2.3 From 6853c55b9fb07d6c2ec0261bff647db8cb4cd655 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sat, 17 Nov 2018 00:08:35 +0000 Subject: Reitz sez: Try --sequential --- docker/bot.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index 4713e1f0e..d4968fbfa 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -8,7 +8,7 @@ ENV PIPENV_HIDE_EMOJIS=1 COPY . /bot WORKDIR /bot -RUN pipenv install --deploy --system +RUN pipenv install --deploy --system --sequential ENTRYPOINT ["/sbin/tini", "--"] CMD ["python", "-m", "bot"] -- cgit v1.2.3 From 4aca6a16d922119c0bae738a56b01981b6025930 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sat, 17 Nov 2018 17:21:35 +0000 Subject: Clean up docker images --- docker/base.Dockerfile | 11 ----------- docker/bot.Dockerfile | 7 +++++-- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'docker') diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index de2c68c13..a1ec0866e 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -9,19 +9,8 @@ RUN apk add --update libxml2 libxml2-dev libxslt-dev RUN apk add --update zlib-dev RUN apk add --update freetype-dev -RUN pip install pipenv - -RUN mkdir /bot -COPY Pipfile /bot -COPY Pipfile.lock /bot -WORKDIR /bot - ENV LIBRARY_PATH=/lib:/usr/lib ENV PIPENV_VENV_IN_PROJECT=1 ENV PIPENV_IGNORE_VIRTUALENVS=1 ENV PIPENV_NOSPIN=1 ENV PIPENV_HIDE_EMOJIS=1 - -RUN pipenv install --deploy --system - -# usage: FROM pythondiscord/bot-base:latest diff --git a/docker/bot.Dockerfile b/docker/bot.Dockerfile index d4968fbfa..5a07a612b 100644 --- a/docker/bot.Dockerfile +++ b/docker/bot.Dockerfile @@ -5,10 +5,13 @@ ENV PIPENV_IGNORE_VIRTUALENVS=1 ENV PIPENV_NOSPIN=1 ENV PIPENV_HIDE_EMOJIS=1 +RUN pip install -U pipenv + +RUN mkdir -p /bot COPY . /bot WORKDIR /bot -RUN pipenv install --deploy --system --sequential +RUN pipenv install --deploy ENTRYPOINT ["/sbin/tini", "--"] -CMD ["python", "-m", "bot"] +CMD ["pipenv", "run", "start"] -- cgit v1.2.3 From 8e5886566d970f9fa6aec8a357bbf5c212b792fe Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Wed, 5 Dec 2018 21:29:57 +0100 Subject: Adding git to the base dockerfile --- docker/base.Dockerfile | 1 + 1 file changed, 1 insertion(+) (limited to 'docker') diff --git a/docker/base.Dockerfile b/docker/base.Dockerfile index a1ec0866e..e46db756a 100644 --- a/docker/base.Dockerfile +++ b/docker/base.Dockerfile @@ -8,6 +8,7 @@ RUN apk add --update jpeg-dev RUN apk add --update libxml2 libxml2-dev libxslt-dev RUN apk add --update zlib-dev RUN apk add --update freetype-dev +RUN apk add --update git ENV LIBRARY_PATH=/lib:/usr/lib ENV PIPENV_VENV_IN_PROJECT=1 -- cgit v1.2.3