From 1e60b2a4ffb817a6eba2b447d217d81dbf4e0064 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 16 Sep 2020 23:07:59 +0200 Subject: [PATCH 1/2] Fix: ignore the .git folder for the Docker context --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 925a3a1..896b90c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ __pycache__/ *.pyc /.env +/.git/** From 2494329bd40c3483cd1cf229d0cb9a4b40a3e4e4 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 16 Sep 2020 23:20:45 +0200 Subject: [PATCH 2/2] Fix: no longer 'git' is required in order to work We use to do local checkouts, but that is all in the past now. While at it, make Dockerfile over repositories more the same. --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc8bc52..4392706 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,6 @@ LABEL org.opencontainers.image.licenses="GPLv2" LABEL org.opencontainers.image.title="DorpsGek" LABEL org.opencontainers.image.description="DorpsGek is an IRC bot that bridges GitHub events to IRC." -RUN apt-get update && apt-get install -y --no-install-recommends \ - git \ - && rm -rf /var/lib/apt/lists/* - WORKDIR /code COPY requirements.txt \ @@ -24,11 +20,10 @@ COPY requirements.txt \ README.md \ dorpsgek.ini \ /code/ -COPY dorpsgek /code/dorpsgek # Needed for Sentry to know what version we are running RUN echo "${BUILD_VERSION}" > /code/.version -RUN pip install -r requirements.txt +RUN pip --no-cache-dir install -r requirements.txt # Validate that what was installed was what was expected RUN pip freeze 2>/dev/null > requirements.installed \ @@ -36,5 +31,7 @@ RUN pip freeze 2>/dev/null > requirements.installed \ || ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \ && exit 1 ) 1>&2 +COPY dorpsgek /code/dorpsgek + ENTRYPOINT ["python", "-m", "dorpsgek"] CMD []