File: Dockerfile

package info (click to toggle)
errbot 6.2.0%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,796 kB
  • sloc: python: 11,557; makefile: 164; sh: 97
file content (30 lines) | stat: -rw-r--r-- 742 bytes parent folder | download
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
ARG BASE_IMAGE=python:3.9-slim
ARG INSTALL_EXTRAS=irc,XMPP,telegram,slack

FROM ${BASE_IMAGE} AS build
ARG INSTALL_EXTRAS
WORKDIR /wheel
COPY . .
RUN apt update && apt install -y build-essential git
RUN pip3 wheel --wheel-dir=/wheel \
    wheel . .[${INSTALL_EXTRAS}]

FROM ${BASE_IMAGE} AS base
ARG INSTALL_EXTRAS
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[${INSTALL_EXTRAS}] && \
    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
STOPSIGNAL SIGINT
ENTRYPOINT [ "/usr/local/bin/errbot" ]