-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (40 loc) · 1.58 KB
/
Dockerfile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM --platform=$BUILDPLATFORM python:3.13.1-slim as builder
ARG APP_VERSION="undefined@docker"
ENV PYTHONDONTWRITEBYTECODE=true \
PYTHONFAULTHANDLER=true \
PYTHONUNBUFFERED=true \
PYTHONHASHSEED=random \
PYTHONPATH=/usr/lib/python3/dist-packages \
# pip
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
# poetry
POETRY_NO_INTERACTION=true \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_VERSION=1.8.2 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/poetry' \
POETRY_HOME='/opt/poetry'
LABEL org.opencontainers.image.title="tg-blog-updater"
LABEL org.opencontainers.image.description="Update Jekyll blog using Telegram"
LABEL org.opencontainers.image.url="https://github.com/hatamiarash7/tg-blog-updater"
LABEL org.opencontainers.image.source="https://github.com/hatamiarash7/tg-blog-updater"
LABEL org.opencontainers.image.vendor="hatamiarash7"
LABEL org.opencontainers.image.author="hatamiarash7"
LABEL org.opencontainers.version="$APP_VERSION"
LABEL org.opencontainers.image.created="$DATE_CREATED"
LABEL org.opencontainers.image.licenses="MIT"
RUN apt update \
&& apt install --no-install-recommends -y \
curl \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN ls && curl -sSL https://install.python-poetry.org | python3 - && sleep 5
ENV PATH="/opt/poetry/bin:$PATH"
COPY ./pyproject.toml .
COPY ./poetry.lock .
RUN poetry install --without dev,test --no-interaction --no-ansi
COPY . .
RUN mkdir proc
CMD ["python", "-m", "tg_blog_updater"]