Skip to content

Commit

Permalink
Feature: Add Dockerfile (#1482)
Browse files Browse the repository at this point in the history
* chore: Add Dockerfile

* chore: Add .dockerignore

* fix: Add --no-cache-dir option

* fix: Add volume

* docs: Add Dockerfile entry
  • Loading branch information
sijis authored Dec 9, 2020
1 parent 2abcdf3 commit 54542fd
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.git
**/*.pyc
*.egg-info/
*.swp
dist/
coverage/
tmp/
docs/_build/
cache/
.local/
.DS_STORE
.tox/
results.xml
.idea/
.vscode/
.pytest_cache/
.Python
pip-selfcheck.json
.coverage
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ features:

- core: Add support for python3.9 (#1477)
- chore: Allow dependabot to check GitHub actions weekly (#1464)
- chore: Add Dockerfile (#1482)

fixes:

Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.8-slim as BUILD
WORKDIR /wheel
COPY . .
RUN pip3 wheel --wheel-dir=/wheel \
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram]

FROM python:3.8-slim
COPY --from=BUILD /wheel /wheel
RUN apt update && \
apt install -y git && \
cd /wheel && \
pip3 -vv install --no-cache-dir --no-index --find-links /wheel \
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram] && \
rm -rf /wheel /var/lib/apt/lists/*

RUN useradd -m errbot
USER errbot
EXPOSE 3141 3142
VOLUME /home/errbot
WORKDIR /home/errbot
ENTRYPOINT [ "/usr/local/bin/errbot" ]

0 comments on commit 54542fd

Please sign in to comment.