From b1febbfbd08cad56da62dbdb06562bc5aba7584c Mon Sep 17 00:00:00 2001 From: rix Date: Mon, 24 Jun 2024 12:31:29 +0200 Subject: [PATCH] v.1.0.7 - Replace baseimage --- .github/workflows/UpdateOnBaseImageChange.yml | 23 ------------------- docker/Dockerfile | 11 ++++----- docker/root/donate.txt | 1 - .../s6-overlay/s6-rc.d/init-adduser/branding | 3 --- docker/root/etc/services.d/wol_api/run | 3 --- wol_api/providers/version.py | 2 +- 6 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/UpdateOnBaseImageChange.yml delete mode 100644 docker/root/donate.txt delete mode 100644 docker/root/etc/s6-overlay/s6-rc.d/init-adduser/branding delete mode 100644 docker/root/etc/services.d/wol_api/run diff --git a/.github/workflows/UpdateOnBaseImageChange.yml b/.github/workflows/UpdateOnBaseImageChange.yml deleted file mode 100644 index 753a15d..0000000 --- a/.github/workflows/UpdateOnBaseImageChange.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Regular base image update check -on: - schedule: - - cron: "0 */6 * * *" - -env: - IMAGE_BASE: lsiobase/alpine.python3 - IMAGE: rix1337/docker-wol-api - -jobs: - check-base-image: - runs-on: ubuntu-latest - steps: - - name: Docker Image Update Checker - id: baseupdatecheck - uses: lucacome/docker-image-update-checker@v1.2.1 - with: - base-image: ${{ env.IMAGE_BASE }} - image: ${{ env.IMAGE }} - - name: Trigger Docker Image build - run: | - curl -XPOST -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/rix1337/WakeOnLAN-API/actions/workflows/BuildImage.yml/dispatches --data '{"ref": "main"}' - if: steps.baseupdatecheck.outputs.needs-updating == 'true' diff --git a/docker/Dockerfile b/docker/Dockerfile index 3cb2138..0ec84ce 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,11 +1,11 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.20 +FROM alpine:latest MAINTAINER rix1337 # Define package name ARG PACKAGE_NAME=wol-api # build tools -RUN apk add --no-cache build-base jq python3-dev py3-pip +RUN apk add --no-cache curl build-base jq python3-dev py3-pip # Optionally set desired version for the build ARG VS="false" @@ -20,12 +20,11 @@ RUN mkdir -p ~/.config/pip && echo -e "[global]\nbreak-system-packages = true" > RUN if [[ ${VS} == "false" ]] ; then echo "Grabbing latest version from pypi.org" && VERSION=$(curl -Ls https://pypi.org/pypi/${PACKAGE_NAME}/json | jq -r .info.version) ; else echo "Using version from workflow_dispatch input" && VERSION=$VS ; fi && \ echo $VERSION && \ pip3 install ${PACKAGE_NAME}=="$VERSION" --no-cache-dir && \ - apk del build-base jq - -# add local files -COPY root/ / + apk del curl build-base jq # volumes and ports VOLUME /config EXPOSE 8080 ENV PYTHONUNBUFFERED=1 + +ENTRYPOINT ["sh", "-c", "wol_api --port=$PORT"] diff --git a/docker/root/donate.txt b/docker/root/donate.txt deleted file mode 100644 index 19890cb..0000000 --- a/docker/root/donate.txt +++ /dev/null @@ -1 +0,0 @@ -https://github.com/sponsors/rix1337 diff --git a/docker/root/etc/s6-overlay/s6-rc.d/init-adduser/branding b/docker/root/etc/s6-overlay/s6-rc.d/init-adduser/branding deleted file mode 100644 index 067b5a0..0000000 --- a/docker/root/etc/s6-overlay/s6-rc.d/init-adduser/branding +++ /dev/null @@ -1,3 +0,0 @@ -─────────────────────────────────────── - WakeOnLAN-API -─────────────────────────────────────── diff --git a/docker/root/etc/services.d/wol_api/run b/docker/root/etc/services.d/wol_api/run deleted file mode 100644 index ccff377..0000000 --- a/docker/root/etc/services.d/wol_api/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -exec wol_api --port=$PORT diff --git a/wol_api/providers/version.py b/wol_api/providers/version.py index c422669..55c1f36 100644 --- a/wol_api/providers/version.py +++ b/wol_api/providers/version.py @@ -6,7 +6,7 @@ def get_version(): - return "1.0.6" + return "1.0.7" def create_version_file():