forked from errbotio/errbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (28 loc) · 988 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.9-slim as build
WORKDIR /wheel
COPY . .
RUN apt update && apt install -y build-essential git
RUN cd /tmp && \
git clone https://github.com/errbotio/err-backend-slackv3 slackv3
RUN pip3 wheel --wheel-dir=/wheel . \
-r /tmp/slackv3/requirements.txt wheel \
errbot errbot[irc] errbot[XMPP] errbot[telegram] && \
cp /tmp/slackv3/requirements.txt /wheel/slackv3-requirements.txt
FROM python:3.9-slim as base
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 . \
-r /wheel/slackv3-requirements.txt \
errbot errbot[irc] errbot[XMPP] errbot[telegram] && \
rm -rf /wheel /var/lib/apt/lists/*
RUN useradd -m errbot
FROM base
EXPOSE 3141 3142
VOLUME /home/errbot
WORKDIR /home/errbot
USER errbot
RUN errbot --init
RUN git clone https://github.com/errbotio/err-backend-slackv3 backend-plugins/slackv3
ENTRYPOINT [ "/usr/local/bin/errbot" ]