Skip to content

Commit 54542fd

Browse files
authored
Feature: Add Dockerfile (#1482)
* chore: Add Dockerfile * chore: Add .dockerignore * fix: Add --no-cache-dir option * fix: Add volume * docs: Add Dockerfile entry
1 parent 2abcdf3 commit 54542fd

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

Diff for: .dockerignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.git
2+
**/*.pyc
3+
*.egg-info/
4+
*.swp
5+
dist/
6+
coverage/
7+
tmp/
8+
docs/_build/
9+
cache/
10+
.local/
11+
.DS_STORE
12+
.tox/
13+
results.xml
14+
.idea/
15+
.vscode/
16+
.pytest_cache/
17+
.Python
18+
pip-selfcheck.json
19+
.coverage

Diff for: CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ features:
55

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

910
fixes:
1011

Diff for: Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM python:3.8-slim as BUILD
2+
WORKDIR /wheel
3+
COPY . .
4+
RUN pip3 wheel --wheel-dir=/wheel \
5+
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram]
6+
7+
FROM python:3.8-slim
8+
COPY --from=BUILD /wheel /wheel
9+
RUN apt update && \
10+
apt install -y git && \
11+
cd /wheel && \
12+
pip3 -vv install --no-cache-dir --no-index --find-links /wheel \
13+
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram] && \
14+
rm -rf /wheel /var/lib/apt/lists/*
15+
16+
RUN useradd -m errbot
17+
USER errbot
18+
EXPOSE 3141 3142
19+
VOLUME /home/errbot
20+
WORKDIR /home/errbot
21+
ENTRYPOINT [ "/usr/local/bin/errbot" ]

0 commit comments

Comments
 (0)