From 8541747deef0a73058d84c850899fef6eaf5407d Mon Sep 17 00:00:00 2001 From: nyyu Date: Mon, 21 Nov 2022 11:21:08 +0100 Subject: [PATCH] feat: support build pip version --- .woodpecker.yml | 1 + Dockerfile | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 15607fb..d44cd9b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,6 +9,7 @@ pipeline: repo: ${DOCKER_REGISTRY}/${CI_REPO_OWNER}/pyload-ng registry: ${DOCKER_REGISTRY} tags: latest + build_args: VERSION=dev when: branch: main event: diff --git a/Dockerfile b/Dockerfile index 398727a..94a2c1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.16 # set version label -ARG BUILD_DATE ARG VERSION -LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="aptalca" +LABEL build_version="pyload docker version:- ${VERSION} Build-date:- $(date +'%F')" ENV HOME="/config" @@ -14,7 +12,6 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ build-base \ - cargo \ curl-dev \ libffi-dev \ libjpeg-turbo-dev \ @@ -32,16 +29,18 @@ RUN \ sqlite \ tesseract-ocr && \ echo "**** install pyload ****" && \ + PYLOAD='https://github.com/pyload/pyload/archive/develop.zip#[all]' && \ + if [[ -n "${VERSION}" && "${VERSION}" != "dev" ]]; then \ + PYLOAD="pyload-ng[all]==${VERSION}"; \ + fi && \ pip3 install -U pip setuptools wheel && \ pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.16/ \ - https://github.com/pyload/pyload/archive/develop.zip#[all] && \ + "${PYLOAD}" && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ - /tmp/* \ - ${HOME}/.cache \ - ${HOME}/.cargo + /tmp/* # add local files COPY root/ /