feat: support build pip version

This commit is contained in:
nyyu 2022-11-21 11:21:08 +01:00
parent 54ca3957a9
commit 8541747dee
2 changed files with 8 additions and 8 deletions

View File

@ -9,6 +9,7 @@ pipeline:
repo: ${DOCKER_REGISTRY}/${CI_REPO_OWNER}/pyload-ng repo: ${DOCKER_REGISTRY}/${CI_REPO_OWNER}/pyload-ng
registry: ${DOCKER_REGISTRY} registry: ${DOCKER_REGISTRY}
tags: latest tags: latest
build_args: VERSION=dev
when: when:
branch: main branch: main
event: event:

View File

@ -1,10 +1,8 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.16 FROM ghcr.io/linuxserver/baseimage-alpine:3.16
# set version label # set version label
ARG BUILD_DATE
ARG VERSION ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="pyload docker version:- ${VERSION} Build-date:- $(date +'%F')"
LABEL maintainer="aptalca"
ENV HOME="/config" ENV HOME="/config"
@ -14,7 +12,6 @@ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \ apk add --no-cache --virtual=build-dependencies \
build-base \ build-base \
cargo \
curl-dev \ curl-dev \
libffi-dev \ libffi-dev \
libjpeg-turbo-dev \ libjpeg-turbo-dev \
@ -32,16 +29,18 @@ RUN \
sqlite \ sqlite \
tesseract-ocr && \ tesseract-ocr && \
echo "**** install pyload ****" && \ 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 && \ pip3 install -U pip setuptools wheel && \
pip install -U --find-links https://wheel-index.linuxserver.io/alpine-3.16/ \ 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 ****" && \ echo "**** cleanup ****" && \
apk del --purge \ apk del --purge \
build-dependencies && \ build-dependencies && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/*
${HOME}/.cache \
${HOME}/.cargo
# add local files # add local files
COPY root/ / COPY root/ /