Skip to content

Commit

Permalink
fix: docker build use local tree (errbotio#1608)
Browse files Browse the repository at this point in the history
* fix: remove git clone references

* chore: install package from local tree

* docs: add info to CHANGES

* fix: explicitely list the errbot packages being installed

* fix: simplify extra packages install
  • Loading branch information
sijis authored Oct 24, 2022
1 parent edb2082 commit 1aa6d9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fixes:
- docs: typos (#1589, #1594)
- chore: simplify isort config using black (#1595)
- fix: detecting entrypoint module paths (#1603)
- chore: fix Docker build to use local tree (#1608)


v6.1.9 (2022-06-11)
Expand Down
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,16 @@ 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
RUN pip3 wheel --wheel-dir=/wheel \
wheel . .[irc,XMPP,telegram] errbot-backend-slackv3

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] && \
pip3 -vv install --no-cache-dir --no-index --find-links /wheel \
errbot errbot[irc,XMPP,telegram] errbot-backend-slackv3 && \
rm -rf /wheel /var/lib/apt/lists/*
RUN useradd -m errbot

Expand All @@ -26,5 +21,4 @@ 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" ]

0 comments on commit 1aa6d9c

Please sign in to comment.