mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-20 18:50:33 +00:00
* feat(web): add local management dashboard Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(web): address review and Python 2 compatibility Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: remove design session artifacts Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(web): harden packaged resources and HTTP semantics Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(web): support Python 2 handler mocks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(web): detect all external schedulers Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
# use the prebuid base builder to speed up: ghcr.io/newfuture/nuitka-buider:musl-master
|
|
ARG BUILDER=base-builder
|
|
ARG PYTHON_VERSION=3.8
|
|
ARG NUITKA_VERSION=main
|
|
|
|
|
|
# build with alpine3.12 (musl-libc 1.1.24)
|
|
FROM python:${PYTHON_VERSION}-alpine3.12 AS base-builder
|
|
RUN apk add --update --no-cache gcc ccache build-base ca-certificates patchelf \
|
|
&& update-ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/* /tmp/* /var/log/*
|
|
|
|
ARG NUITKA_VERSION
|
|
RUN python3 -m pip install --no-cache-dir --prefer-binary \
|
|
"Nuitka[onefile] @ https://github.com/Nuitka/Nuitka/archive/${NUITKA_VERSION}.zip" \
|
|
--disable-pip-version-check \
|
|
# --break-system-packages \
|
|
&& rm -rf /var/cache/* /tmp/* /var/log/* /root/.cache
|
|
WORKDIR /app
|
|
|
|
|
|
FROM ${BUILDER} AS builder
|
|
COPY run.py .github/patch.py .
|
|
COPY ddns ddns
|
|
COPY web web
|
|
ARG GITHUB_REF_NAME
|
|
ENV GITHUB_REF_NAME=${GITHUB_REF_NAME}
|
|
RUN python3 patch.py
|
|
RUN python3 -O -m nuitka run.py \
|
|
--remove-output \
|
|
--lto=yes
|
|
RUN cp dist/ddns /bin/ddns && cp dist/ddns /ddns
|
|
|
|
|
|
# export the binary
|
|
FROM scratch AS export
|
|
COPY --from=builder /ddns /ddns
|