From 9159eee46d155e8568f26b0c5589232507d75cc1 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 14:52:08 +0100 Subject: [PATCH 01/12] README.md --- llama-cpp-python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-cpp-python/README.md b/llama-cpp-python/README.md index 14b48f5..575851f 100644 --- a/llama-cpp-python/README.md +++ b/llama-cpp-python/README.md @@ -22,7 +22,7 @@ 6. [Find Me](#findme) 7. [License](#license) -## 1 Usage {#usage} +## 1 Usage **IMPORTANT: you need to add SYS_RESOURCE capability to enable MLOCK support** From 0c48c61d0fd7e5c218aead76a74c930d202795be Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 18:01:58 +0100 Subject: [PATCH 02/12] alpine VERSION added --- .github/workflows/alpine.yml | 8 ++++++++ alpine/Dockerfile | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 825bd0d..e672eb1 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -40,6 +40,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and Tag + id: tag + run: | + docker build -t 3x3cut0r/alpine:latest ./alpine + VERSION=$(docker run --rm 3x3cut0r/alpine:latest sh -c "cat /VERSION | grep alpine | cut -d= -f2") + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + # https://github.com/docker/build-push-action - name: Build and push uses: docker/build-push-action@v5 @@ -50,3 +57,4 @@ jobs: push: true tags: | 3x3cut0r/alpine:latest + 3x3cut0r/alpine:${{ steps.tag.outputs.VERSION }} diff --git a/alpine/Dockerfile b/alpine/Dockerfile index b6707f7..1a83631 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,8 +1,15 @@ -FROM alpine:latest +ARG IMAGE=alpine:latest + +# App-Stage +FROM ${IMAGE} +ARG IMAGE + LABEL maintainer="Julian Reith " LABEL description="official alpine linux with gosu, libcap installed" -# add gosu +WORKDIR / + +# Add gosu ENV GOSU_VERSION 1.16 RUN set -eux; \ \ @@ -16,21 +23,26 @@ RUN set -eux; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ \ -# verify the signature +# Verify the signature export GNUPGHOME="$(mktemp -d)"; \ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ \ -# clean up fetch dependencies +# Clean up fetch dependencies apk del --no-network .gosu-deps; \ \ chmod +x /usr/local/bin/gosu; \ -# verify that the binary works +# Verify that the binary works gosu --version; \ gosu nobody true -# add dependencies for all images +# Add dependencies for all images RUN apk add --no-cache tzdata \ libcap + +# Store versions in /VERSION +RUN touch /VERSION && \ + echo "alpine=$(cat /etc/alpine-release)" > /VERSION && \ + echo "gosu=$GOSU_VERSION" >> /VERSION \ No newline at end of file From 115ba3ff7791c586832c4db3abe8b36fa04c16fd Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 18:04:46 +0100 Subject: [PATCH 03/12] description fixed --- glype-proxy/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glype-proxy/Dockerfile b/glype-proxy/Dockerfile index b4b9633..8f540a6 100644 --- a/glype-proxy/Dockerfile +++ b/glype-proxy/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:latest as build LABEL maintainer="Julian Reith " -LABEL description="glype - a web-based proxy on webdevops/php-nginx:7.4-alpine" +LABEL description="glype - a web-based proxy on webdevops/php-nginx:8.0-alpine" WORKDIR /app From c3dd372be95cec9be56fc8dd9a9d25fe736d22e8 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 22:07:16 +0100 Subject: [PATCH 04/12] tftpd-hpa VERSION added --- .github/workflows/tftpd-hpa.yml | 8 ++++++++ tftpd-hpa/Dockerfile | 6 +++++- tftpd-hpa/README.md | 2 +- tftpd-hpa/docker-entrypoint.sh | 20 ++++++++++++++++++-- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tftpd-hpa.yml b/.github/workflows/tftpd-hpa.yml index 60d2c9f..de354e5 100644 --- a/.github/workflows/tftpd-hpa.yml +++ b/.github/workflows/tftpd-hpa.yml @@ -42,6 +42,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and Tag + id: tag + run: | + docker build -t 3x3cut0r/tftpd-hpa:latest ./tftpd-hpa + VERSION=$(docker run --rm 3x3cut0r/tftpd-hpa:latest sh -c "cat /VERSION | grep tftpd-hpa | cut -d= -f2") + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + # https://github.com/docker/build-push-action - name: Build and push uses: docker/build-push-action@v5 @@ -52,3 +59,4 @@ jobs: push: true tags: | 3x3cut0r/tftpd-hpa:latest + 3x3cut0r/tftpd-hpa:${{ steps.tag.outputs.VERSION }} diff --git a/tftpd-hpa/Dockerfile b/tftpd-hpa/Dockerfile index 10722c4..592025e 100644 --- a/tftpd-hpa/Dockerfile +++ b/tftpd-hpa/Dockerfile @@ -18,7 +18,6 @@ RUN addgroup -g $GID -S tftp && \ # add tftp-hpa RUN apk add --no-cache tftp-hpa runit tzdata && \ mkdir -p /tftpboot \ - /runit-services \ /runit-services/tftpd-hpa \ /runit-services/syslogd && \ echo -e "#!/bin/sh\nbusybox syslogd -n -O /dev/stdout" > \ @@ -29,6 +28,11 @@ RUN apk add --no-cache tftp-hpa runit tzdata && \ chmod +x /runit-services/syslogd/run \ /runit-services/tftpd-hpa/run +# store versions in /VERSION +RUN touch /VERSION && \ + echo "alpine=$(cat /etc/alpine-release)" > /VERSION && \ + echo "tftpd-hpa=$(/usr/sbin/in.tftpd --version | cut -d, -f1 | cut -d' ' -f2)" >> /VERSION + # tftpd-hpa environment variables # (see: https://manpages.debian.org/testing/tftpd-hpa/tftpd.8.en.html) ENV TZ="UTC" \ diff --git a/tftpd-hpa/README.md b/tftpd-hpa/README.md index 792afc7..71148e1 100644 --- a/tftpd-hpa/README.md +++ b/tftpd-hpa/README.md @@ -95,7 +95,7 @@ docker run -d \ ### 1.2 docker-compose.yaml ```shell -version: '3' +version: '3.9' services: tftpd-hpa: diff --git a/tftpd-hpa/docker-entrypoint.sh b/tftpd-hpa/docker-entrypoint.sh index 21cd391..9169bea 100644 --- a/tftpd-hpa/docker-entrypoint.sh +++ b/tftpd-hpa/docker-entrypoint.sh @@ -1,9 +1,20 @@ #!/bin/sh set -e + +############################ +# setup user environment # +############################ + # set timezone ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +############################ +# run app # +############################ + # if started without args, exec in.tftpd if [ "$#" = "0" ]; then + param="" if [ "$BLOCKSIZE" != "" ]; then param="${param} --blocksize $BLOCKSIZE"; fi if [ "$CREATE" = "1" ]; then param="${param} --create"; fi @@ -18,21 +29,26 @@ if [ "$#" = "0" ]; then if [ "$VERBOSE" = "1" ]; then param="${param} --verbose"; fi if [ "$VERBOSITY" != "" ]; then param="${param} --verbosity $VERBOSITY"; fi param="--foreground --address 0.0.0.0:69 --user tftp ${param} /tftpboot" + echo -e "\nINFO: /usr/sbin/in.tftpd ${param}\n" echo -e "#!/bin/sh\n/usr/sbin/in.tftpd ${param}" > /runit-services/tftpd-hpa/run + else # if first arg looks like a flag, assume we want to run in.tftpd if [ "$( echo "$1" | cut -c1 )" = "-" ]; then echo -e "\nINFO: /usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@\n" echo -e "#!/bin/sh\n/usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@" > /runit-services/tftpd-hpa/run + # if the first arg is "in.tftpd" ... elif [ "$1" = "in.tftpd" ]; then echo -e "\nINFO: /usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@\n" echo -e "#!/bin/sh\n/usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp ${@}" > /runit-services/tftpd-hpa/run + # if first arg doesn't looks like a flag else - printf "\nINFO: $@\n\n" - echo -e "#!/bin/sh\n$@" > /runit-services/tftpd-hpa/run + exec "$@" + exit 0 fi fi + exec runsvdir /runit-services From cb4842c6882b9c22aa52f0b3dfb559797af1d854 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 22:55:59 +0100 Subject: [PATCH 05/12] changing ownership removed --- streamlit/README.md | 2 ++ streamlit/docker-entrypoint.sh | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/streamlit/README.md b/streamlit/README.md index d8511c6..f8136d4 100644 --- a/streamlit/README.md +++ b/streamlit/README.md @@ -88,10 +88,12 @@ docker run -d \ ```shell version: '3.9' + services: # https://hub.docker.com/r/3x3cut0r/streamlit streamlit: image: 3x3cut0r/streamlit:latest + container_name: streamlit environment: TZ: Europe/Berlin volumes: diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index 395cc6a..eec84df 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -8,9 +8,6 @@ set -e # Set PATH for the virtual environment export PATH="/venv/bin:$PATH" -# Set ownership -chown -R root:root /app - # Set permissions chmod -R 644 /app From 8022abd8bfbeb27af73cc6639e6f7c63f38179a3 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Tue, 31 Oct 2023 23:57:01 +0100 Subject: [PATCH 06/12] bugfix --- streamlit/docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index eec84df..1cb461f 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -e ############################ # setup global environment # @@ -9,7 +8,7 @@ set -e export PATH="/venv/bin:$PATH" # Set permissions -chmod -R 644 /app +chmod -R 755 /app ############################ # setup user environment # @@ -17,7 +16,7 @@ chmod -R 644 /app # install python requirements if [ -s /app/requirements.txt ]; then - /venv/bin/pip install --no-cache-dir -r /app/requirements.txt > /dev/null 2>&1 + /venv/bin/pip install --no-cache-dir -r /app/requirements.txt fi # TIMEZONE @@ -38,5 +37,6 @@ if [ "$#" = "0" ]; then # if started with args, run args instead else exec "$@" + exit 0 fi From f55e8ceb8146dfff559e1b9aaab332cadc2fdac9 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 1 Nov 2023 00:09:08 +0100 Subject: [PATCH 07/12] install requirements only once --- streamlit/docker-entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index 1cb461f..e588f0f 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -14,9 +14,13 @@ chmod -R 755 /app # setup user environment # ############################ -# install python requirements +# install python requirements (only once) +install_complete="/app/requirements.complete" if [ -s /app/requirements.txt ]; then - /venv/bin/pip install --no-cache-dir -r /app/requirements.txt + if [ ! -f $install_complete ]; then + /venv/bin/pip install --no-cache-dir -r /app/requirements.txt + touch $install_complete + fi fi # TIMEZONE From 14583d8d400a17899854904f17801184bf070f7f Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 1 Nov 2023 00:23:13 +0100 Subject: [PATCH 08/12] print no error --- streamlit/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index e588f0f..d6282ee 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -18,7 +18,7 @@ chmod -R 755 /app install_complete="/app/requirements.complete" if [ -s /app/requirements.txt ]; then if [ ! -f $install_complete ]; then - /venv/bin/pip install --no-cache-dir -r /app/requirements.txt + /venv/bin/pip install --no-cache-dir -r /app/requirements.txt 2>/dev/null touch $install_complete fi fi From 370d4375201bb7bd0538e4f8284a7fb48ba7fc59 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 1 Nov 2023 00:26:47 +0100 Subject: [PATCH 09/12] install output removed --- streamlit/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index d6282ee..0a7daaf 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -18,7 +18,7 @@ chmod -R 755 /app install_complete="/app/requirements.complete" if [ -s /app/requirements.txt ]; then if [ ! -f $install_complete ]; then - /venv/bin/pip install --no-cache-dir -r /app/requirements.txt 2>/dev/null + /venv/bin/pip install --no-cache-dir -r /app/requirements.txt > /dev/null 2>&1 touch $install_complete fi fi From 59aaec75603a154088749bbeb839717bfe46bb6d Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 1 Nov 2023 00:44:50 +0100 Subject: [PATCH 10/12] quiet added --- streamlit/docker-entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streamlit/docker-entrypoint.sh b/streamlit/docker-entrypoint.sh index 0a7daaf..e3cbbfb 100644 --- a/streamlit/docker-entrypoint.sh +++ b/streamlit/docker-entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e ############################ # setup global environment # @@ -18,7 +19,7 @@ chmod -R 755 /app install_complete="/app/requirements.complete" if [ -s /app/requirements.txt ]; then if [ ! -f $install_complete ]; then - /venv/bin/pip install --no-cache-dir -r /app/requirements.txt > /dev/null 2>&1 + /venv/bin/pip install --no-cache-dir --disable-pip-version-check --quiet -r /app/requirements.txt touch $install_complete fi fi From 790622189199fa75d3891f55be1b2ccd9facf254 Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 1 Nov 2023 04:20:53 +0000 Subject: [PATCH 11/12] version updated (62adbebf-ls191) --- tvheadend-sundtek/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvheadend-sundtek/VERSION b/tvheadend-sundtek/VERSION index 56ac0c1..5cad177 100644 --- a/tvheadend-sundtek/VERSION +++ b/tvheadend-sundtek/VERSION @@ -1 +1 @@ -2d92f58f-ls190 +62adbebf-ls191 From 161a12a9c30f42b81efadbdca3ab29bb800d4fec Mon Sep 17 00:00:00 2001 From: 3x3cut0r Date: Wed, 8 Nov 2023 04:20:47 +0000 Subject: [PATCH 12/12] version updated (62adbebf-ls192) --- tvheadend-sundtek/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvheadend-sundtek/VERSION b/tvheadend-sundtek/VERSION index 5cad177..46f0b14 100644 --- a/tvheadend-sundtek/VERSION +++ b/tvheadend-sundtek/VERSION @@ -1 +1 @@ -62adbebf-ls191 +62adbebf-ls192