diff --git a/.dockerignore b/.dockerignore index 925a3a1..896b90c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ __pycache__/ *.pyc /.env +/.git/** 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 []