mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-21 04:23:15 +01:00
Slim down container images and move them to Python 3.14 and Debian Trixie
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
# Install necessary runtime packages
|
# Install necessary runtime packages
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
wireguard \
|
wireguard-tools \
|
||||||
iptables \
|
iptables \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.12-alpine
|
FROM python:3.14-alpine
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
PYTHONUNBUFFERED=1
|
PYTHONUNBUFFERED=1
|
||||||
|
|||||||
@@ -2,14 +2,9 @@ FROM caddy:2
|
|||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 \
|
python3 \
|
||||||
py3-pip \
|
|
||||||
py3-yaml \
|
|
||||||
inotify-tools \
|
inotify-tools \
|
||||||
bash
|
bash
|
||||||
|
|
||||||
RUN python3 -m venv /usr/local/bin/.venv && \
|
|
||||||
/usr/local/bin/.venv/bin/pip install --no-cache-dir pyyaml
|
|
||||||
|
|
||||||
COPY export_wireguard_webadmin_config.py /usr/local/bin/export_wireguard_webadmin_config.py
|
COPY export_wireguard_webadmin_config.py /usr/local/bin/export_wireguard_webadmin_config.py
|
||||||
COPY process_config.py /usr/local/bin/process_config.py
|
COPY process_config.py /usr/local/bin/process_config.py
|
||||||
COPY entrypoint.sh /usr/local/bin/caddy-entrypoint.sh
|
COPY entrypoint.sh /usr/local/bin/caddy-entrypoint.sh
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
PYTHON="${SCRIPT_DIR}/.venv/bin/python3"
|
PYTHON="python3"
|
||||||
JSON_DIR="${JSON_DIR:-/caddy_json_export}"
|
JSON_DIR="${JSON_DIR:-/caddy_json_export}"
|
||||||
CADDYFILE_PATH="${CADDYFILE_PATH:-/etc/caddy/Caddyfile}"
|
CADDYFILE_PATH="${CADDYFILE_PATH:-/etc/caddy/Caddyfile}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Single stage build for Cluster Node
|
# Single stage build for Cluster Node
|
||||||
FROM python:3.12-slim
|
FROM python:3.14-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install necessary runtime packages
|
# Install necessary runtime packages
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
wireguard \
|
wireguard-tools \
|
||||||
iptables \
|
iptables \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
net-tools \
|
net-tools \
|
||||||
@@ -21,13 +21,11 @@ COPY requirements.txt /app/requirements.txt
|
|||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy the application code
|
# Copy the application code
|
||||||
COPY . /app/
|
COPY cluster_worker.py entrypoint.sh /app/
|
||||||
|
|
||||||
# Set execution permissions on scripts
|
# Set execution permissions on scripts
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
|
||||||
ARG SERVER_ADDRESS
|
|
||||||
ARG DEBUG_MODE
|
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
CMD ["python", "-u", "/app/cluster_worker.py"]
|
CMD ["python", "-u", "/app/cluster_worker.py"]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM ubuntu:latest
|
FROM debian:trixie-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y cron curl && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y --no-install-recommends cron curl ca-certificates procps && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
COPY cron_runner.sh /cron_runner.sh
|
COPY cron_runner.sh /cron_runner.sh
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
FROM ubuntu:latest
|
FROM debian:trixie-slim
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y dnsmasq nano inotify-tools psmisc && \
|
apt-get install -y --no-install-recommends dnsmasq nano inotify-tools procps && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
FROM python:3.12-slim
|
FROM python:3.14-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
net-tools \
|
net-tools \
|
||||||
inetutils-ping \
|
inetutils-ping \
|
||||||
inetutils-traceroute \
|
|
||||||
nano \
|
nano \
|
||||||
vim-nox \
|
|
||||||
rrdtool \
|
rrdtool \
|
||||||
librrd-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
Reference in New Issue
Block a user