mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
69 lines
2.4 KiB
Docker
69 lines
2.4 KiB
Docker
FROM docker.io/debian:bookworm-slim AS builder-base
|
|
|
|
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 -
|
|
|
|
FROM builder-base AS builder-discord
|
|
|
|
ARG VERSION=c2ade3f4ff452066efd7c3ce130ec04a1be3c7ed
|
|
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 && \
|
|
python3 -m pip install --requirement requirements.txt
|
|
|
|
RUN cp -R /src/slidcord /venv/lib/python3.11/site-packages/legacy_module
|
|
|
|
FROM builder-base AS builder-skype
|
|
|
|
ARG VERSION=a08320895c054b3cfdd4876d4ca7faccf4548eec
|
|
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
|
|
|
|
ENV GOBIN=/usr/bin
|
|
RUN go install github.com/go-python/gopy@latest && \
|
|
go install golang.org/x/tools/cmd/goimports@latest
|
|
|
|
RUN python3 -m pip install pybindgen
|
|
|
|
ARG VERSION=7c48a17fd7cc10b123c7d2aa1703033dc6e3fe25
|
|
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
|
|
|
|
FROM docker.io/debian:bookworm-slim
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV SLIDGE_LEGACY_MODULE=legacy_module
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
|
ca-certificates python3 libpython3.11 python3-gdbm libidn12 libmagic1 media-types shared-mime-info \
|
|
ffmpeg
|
|
|
|
RUN addgroup --system --gid 10000 slidge
|
|
RUN adduser --system --uid 10000 --ingroup slidge --home /var/lib/slidge slidge
|
|
|
|
COPY --from=builder-discord /venv /venv/discord
|
|
COPY --from=builder-skype /venv /venv/skype
|
|
COPY --from=builder-whatsapp /venv /venv/whatsapp
|
|
|
|
USER slidge
|