Обновить Dockerfile
This commit is contained in:
parent
990d6e9a38
commit
9273fd7e9a
46
Dockerfile
46
Dockerfile
|
|
@ -1,41 +1,29 @@
|
||||||
FROM python:3.12-bookworm
|
FROM python:3.12-slim-bookworm
|
||||||
|
|
||||||
# ✅ Устанавливаем все зависимости включая openresolv
|
# The installer requires curl (and certificates) to download the release archive
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates nano
|
||||||
apt-transport-https \
|
|
||||||
gnupg \
|
|
||||||
lsb-release \
|
|
||||||
curl \
|
|
||||||
ca-certificates \
|
|
||||||
wireguard \
|
|
||||||
nano \
|
|
||||||
iptables \
|
|
||||||
iproute2 \
|
|
||||||
openresolv \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Устанавливаем UV
|
# Download the latest installer
|
||||||
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
||||||
|
|
||||||
|
# Run the installer then remove it
|
||||||
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
||||||
|
|
||||||
|
# Ensure the installed binary is on the `PATH`
|
||||||
ENV PATH="/root/.local/bin/:$PATH"
|
ENV PATH="/root/.local/bin/:$PATH"
|
||||||
|
|
||||||
# Рабочая директория
|
|
||||||
|
# Copy the project into the image
|
||||||
|
ADD . /app
|
||||||
|
|
||||||
|
# Sync the project into a new environment, using the frozen lockfile
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Копируем проект
|
|
||||||
COPY . /app
|
|
||||||
|
|
||||||
# Копируем start.sh
|
|
||||||
COPY start.sh /app/start.sh
|
|
||||||
|
|
||||||
# ✅ Исправляем права на конфиг WireGuard (должно быть 600)
|
|
||||||
RUN chmod 600 /app/wireguard/wg_confs/wg0.conf
|
|
||||||
|
|
||||||
# Устанавливаем зависимости Python
|
|
||||||
RUN uv sync --frozen
|
RUN uv sync --frozen
|
||||||
|
|
||||||
# Порт Flask
|
# Expose port 8000
|
||||||
EXPOSE 5205
|
EXPOSE 5205
|
||||||
|
|
||||||
# Запуск
|
|
||||||
CMD ["/app/start.sh"]
|
# Presuming there is a `my_app` command provided by the project uvicorn main:app --reload
|
||||||
|
CMD ["uv", "run", "main.py"]
|
||||||
Loading…
Reference in New Issue