2023-03-22 09:26:21 +00:00
|
|
|
FROM python:3.10-alpine AS dependencies
|
|
|
|
RUN apk add --update build-base python3-dev py-pip musl-dev
|
2022-03-28 14:09:57 +00:00
|
|
|
|
2023-03-22 09:26:21 +00:00
|
|
|
WORKDIR /usr/src/greed
|
|
|
|
COPY ./requirements.txt ./requirements.txt
|
|
|
|
RUN pip install --no-cache-dir --requirement requirements.txt
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
FROM python:3.10-slim AS final
|
|
|
|
|
|
|
|
COPY --from=dependencies /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
|
2022-03-28 14:09:57 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/greed
|
2023-03-22 09:26:21 +00:00
|
|
|
COPY . /usr/src/greed
|
2022-03-28 14:09:57 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["python", "-OO"]
|
|
|
|
CMD ["core.py"]
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
ENV CONFIG_PATH="/etc/greed/config.toml"
|
2023-03-22 09:26:21 +00:00
|
|
|
ENV DB_ENGINE="sqlite:////var/lib/greed/database.sqlite"
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.title="greed"
|
|
|
|
LABEL org.opencontainers.image.description="A customizable, multilanguage Telegram shop bot"
|
|
|
|
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"
|
|
|
|
LABEL org.opencontainers.image.url="https://github.com/Steffo99/greed/"
|
|
|
|
LABEL org.opencontainers.image.authors="Stefano Pigozzi <me@steffo.eu>"
|