2023-12-20 23:11:27 +00:00
|
|
|
FROM docker.io/debian:bookworm-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340 AS builder-base
|
2022-12-13 00:11:56 +00:00
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
|
|
ca-certificates git curl python3 python3-pip python3-venv
|
|
|
|
|
|
|
|
ENV PATH=/venv/bin:/root/.local/bin:$PATH
|
|
|
|
RUN python3 -m venv /venv && python3 -m pip install wheel
|
|
|
|
RUN curl -fL https://install.python-poetry.org | python3 -
|
|
|
|
|
2023-06-19 10:03:02 +00:00
|
|
|
FROM builder-base AS builder-discord
|
2023-03-26 17:25:08 +00:00
|
|
|
|
2023-12-20 23:25:33 +00:00
|
|
|
ARG VERSION=b23dd74266756b6182e1c750742c264e24434b0c # renovate: datasource=git-refs depName=https://git.sr.ht/~nicoco/slidcord
|
2023-06-19 10:03:02 +00:00
|
|
|
RUN git clone https://git.sr.ht/~nicoco/slidcord /src && \
|
|
|
|
cd /src && git reset --hard ${VERSION}
|
|
|
|
|
|
|
|
RUN cd /src && poetry export --without-hashes > requirements.txt && \
|
2022-12-13 00:11:56 +00:00
|
|
|
python3 -m pip install --requirement requirements.txt
|
|
|
|
|
2023-06-19 10:03:02 +00:00
|
|
|
RUN cp -R /src/slidcord /venv/lib/python3.11/site-packages/legacy_module
|
|
|
|
|
|
|
|
FROM builder-base AS builder-skype
|
2022-12-13 00:11:56 +00:00
|
|
|
|
2023-12-20 23:25:33 +00:00
|
|
|
ARG VERSION=e200ad614d480e246c5d1ca25d50e938f2ba2aee # renovate: datasource=git-refs depName=https://git.sr.ht/~nicoco/skidge
|
2023-06-19 10:03:02 +00:00
|
|
|
RUN git clone https://git.sr.ht/~nicoco/skidge /src && \
|
|
|
|
cd /src && git reset --hard ${VERSION}
|
|
|
|
|
|
|
|
RUN cd /src && poetry export --without-hashes > requirements.txt && \
|
|
|
|
python3 -m pip install --requirement requirements.txt
|
|
|
|
|
|
|
|
RUN cp -R /src/skidge /venv/lib/python3.11/site-packages/legacy_module
|
|
|
|
|
|
|
|
FROM builder-base AS builder-whatsapp
|
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
|
|
golang gcc python3-dev
|
2022-12-13 00:11:56 +00:00
|
|
|
|
|
|
|
ENV GOBIN=/usr/bin
|
2023-12-20 22:56:57 +00:00
|
|
|
RUN go install github.com/go-python/gopy@latest && \
|
2022-12-13 00:11:56 +00:00
|
|
|
go install golang.org/x/tools/cmd/goimports@latest
|
|
|
|
|
|
|
|
RUN python3 -m pip install pybindgen
|
|
|
|
|
2023-12-20 23:25:33 +00:00
|
|
|
ARG VERSION=61db123ace5a59a6d46430d85fca8d269de9dd0f # renovate: datasource=git-refs depName=https://git.sr.ht/~nicoco/slidge-whatsapp
|
2023-06-19 10:03:02 +00:00
|
|
|
RUN git clone https://git.sr.ht/~nicoco/slidge-whatsapp /src && \
|
|
|
|
cd /src && git reset --hard ${VERSION}
|
|
|
|
|
|
|
|
RUN cd /src && poetry export --without-hashes > requirements.txt && \
|
|
|
|
python3 -m pip install --requirement requirements.txt
|
|
|
|
|
|
|
|
RUN cd /src/slidge_whatsapp && gopy build -vm=python3 -output=generated -no-make=true .
|
|
|
|
RUN cp -R /src/slidge_whatsapp /venv/lib/python3.11/site-packages/legacy_module
|
2022-12-13 00:11:56 +00:00
|
|
|
|
2023-12-20 23:11:27 +00:00
|
|
|
FROM docker.io/debian:bookworm-slim@sha256:f80c45482c8d147da87613cb6878a7238b8642bcc24fc11bad78c7bec726f340
|
2022-12-31 12:24:57 +00:00
|
|
|
ENV PYTHONUNBUFFERED=1
|
2023-06-19 10:03:02 +00:00
|
|
|
ENV SLIDGE_LEGACY_MODULE=legacy_module
|
2022-12-13 00:11:56 +00:00
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
2023-07-18 21:06:54 +00:00
|
|
|
ca-certificates python3 libpython3.11 python3-gdbm libidn12 libmagic1 media-types shared-mime-info \
|
|
|
|
ffmpeg
|
2022-12-13 00:11:56 +00:00
|
|
|
|
2022-12-31 12:24:57 +00:00
|
|
|
RUN addgroup --system --gid 10000 slidge
|
|
|
|
RUN adduser --system --uid 10000 --ingroup slidge --home /var/lib/slidge slidge
|
2022-12-13 00:11:56 +00:00
|
|
|
|
2023-06-19 10:03:02 +00:00
|
|
|
COPY --from=builder-discord /venv /venv/discord
|
|
|
|
COPY --from=builder-skype /venv /venv/skype
|
|
|
|
COPY --from=builder-whatsapp /venv /venv/whatsapp
|
2022-12-13 00:11:56 +00:00
|
|
|
|
2022-12-31 12:24:57 +00:00
|
|
|
USER slidge
|