Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize Docker-files with other repositories #31

Merged
merged 2 commits into from Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
@@ -1,3 +1,4 @@
__pycache__/
*.pyc
/.env
/.git/**
9 changes: 3 additions & 6 deletions Dockerfile
Expand Up @@ -13,28 +13,25 @@ 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 \
LICENSE \
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 \
&& diff -u --strip-trailing-cr requirements.txt requirements.installed 1>&2 \
|| ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \
&& exit 1 ) 1>&2

COPY dorpsgek /code/dorpsgek

ENTRYPOINT ["python", "-m", "dorpsgek"]
CMD []