Skip to content

Commit

Permalink
refactor: simplify the final image
Browse files Browse the repository at this point in the history
  • Loading branch information
sijis committed Jun 24, 2022
1 parent 9c743ac commit 6ab921f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN pip3 wheel --wheel-dir=/wheel . \
errbot errbot[irc] errbot[XMPP] errbot[telegram] && \
cp /tmp/slackv3/requirements.txt /wheel/slackv3-requirements.txt

FROM python:3.9-slim
FROM python:3.9-slim as base
COPY --from=build /wheel /wheel
RUN apt update && \
apt install -y git && \
Expand All @@ -18,12 +18,13 @@ RUN apt update && \
-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
EXPOSE 3141 3142
VOLUME /home/errbot
ENTRYPOINT [ "/usr/local/bin/errbot" ]

0 comments on commit 6ab921f

Please sign in to comment.