diff --git a/.github/actions/run-goss-tests/action.yaml b/.github/actions/run-goss-tests/action.yaml index 12656cd..690a455 100644 --- a/.github/actions/run-goss-tests/action.yaml +++ b/.github/actions/run-goss-tests/action.yaml @@ -19,7 +19,7 @@ runs: using: composite steps: - name: Install Goss - uses: e1himself/goss-installation-action@v1.2.1 + uses: e1himself/goss-installation-action@v1.3.0 with: version: v0.3.18 diff --git a/apps/kometa/Dockerfile b/apps/kometa/Dockerfile index 39921b3..01cd651 100644 --- a/apps/kometa/Dockerfile +++ b/apps/kometa/Dockerfile @@ -7,7 +7,7 @@ RUN apk update && apk upgrade && \ RUN git clone -b $VERSION https://github.com/Kometa-Team/Kometa.git /source -FROM python:3.11-slim-buster +FROM python:3.11-slim-bullseye ARG BRANCH_NAME=master ENV BRANCH_NAME=${BRANCH_NAME} diff --git a/apps/prowlarr/Dockerfile b/apps/prowlarr/Dockerfile index 45beeeb..b3140e6 100644 --- a/apps/prowlarr/Dockerfile +++ b/apps/prowlarr/Dockerfile @@ -1,27 +1,3 @@ -############# importarr -FROM --platform=linux/amd64 golang:1.24-bullseye AS importarr - -# Install necessary build tools and SQLite dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc libc6-dev sqlite3 libsqlite3-dev musl musl-dev musl-tools gcc-multilib git && \ - rm -rf /var/lib/apt/lists/* - -RUN ln -s /usr/bin/musl-gcc /usr/bin/x86_64-linux-musl-gcc - -# Set environment variables -ENV CGO_ENABLED=1 GOOS=linux GOARCH=amd64 - -RUN git clone https://github.com/elfhosted/importarr.git /app - -# Set the working directory -WORKDIR /app - -# Copy the Go module files and download dependencies -RUN go mod download - -# Build the Go binary -RUN go build -ldflags="-linkmode external -extldflags -static" -o importarr cmd/main.go - FROM ghcr.io/ipromknight/alpine:rolling ARG TARGETPLATFORM @@ -62,9 +38,6 @@ RUN \ ENV COMPlus_EnableDiagnostics=0 -COPY --from=importarr /app/importarr /usr/local/bin/importarr -RUN chmod +x /usr/local/bin/importarr - USER 568 COPY ./apps/prowlarr/config.xml.tmpl /app/config.xml.tmpl COPY --chmod=0755 ./apps/prowlarr/promknight-entrypoint.sh /promknight-entrypoint.sh diff --git a/apps/radarr/Dockerfile b/apps/radarr/Dockerfile index b161d45..b228723 100644 --- a/apps/radarr/Dockerfile +++ b/apps/radarr/Dockerfile @@ -1,60 +1,3 @@ -FROM --platform=linux/amd64 alpine:latest as cloner - -RUN apk update && apk upgrade && \ - apk add --no-cache git - -RUN git clone https://github.com/elfhosted/ffprobe-shim.git /source - -FROM --platform=linux/amd64 golang:1.24-alpine AS builder - -# Install git for fetching dependencies -RUN apk add --no-cache git - -# Set working directory -WORKDIR /app - -# Copy go.mod and go.sum first to leverage Docker cache -COPY --from=cloner /source/go.mod go.sum* ./ - -# Initialize module if go.mod doesn't exist -RUN if [ ! -f go.mod ]; then \ - go mod init ffprobe-shim && \ - go get github.com/middelink/go-parse-torrent-name; \ - else \ - go get github.com/middelink/go-parse-torrent-name; \ - fi - -# Copy source code -COPY --from=cloner /source/*.go ./ - -# Add a build argument to bust the cache -ARG CACHE_BUSTER=1 -RUN echo "Cache Buster: $CACHE_BUSTER" && CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ffprobe - -############# importarr -FROM --platform=linux/amd64 golang:1.24-bullseye AS importarr - -# Install necessary build tools and SQLite dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc libc6-dev sqlite3 libsqlite3-dev musl musl-dev musl-tools gcc-multilib git && \ - rm -rf /var/lib/apt/lists/* - -RUN ln -s /usr/bin/musl-gcc /usr/bin/x86_64-linux-musl-gcc - -# Set environment variables -ENV CGO_ENABLED=1 GOOS=linux GOARCH=amd64 - -RUN git clone https://github.com/elfhosted/importarr.git /app - -# Set the working directory -WORKDIR /app - -# Copy the Go module files and download dependencies -RUN go mod download - -# Build the Go binary -RUN go build -ldflags="-linkmode external -extldflags -static" -o importarr cmd/main.go - FROM ghcr.io/ipromknight/alpine:rolling ARG TARGETPLATFORM @@ -94,10 +37,8 @@ RUN \ && chmod -R 755 /app \ && rm -rf /tmp/* -RUN mv /app/bin/ffprobe /app/bin/ffprobe-real -COPY --from=builder /app/ffprobe /app/bin/ffprobe -COPY --from=importarr /app/importarr /usr/local/bin/importarr -RUN chmod +x /usr/local/bin/importarr +RUN mv /app/bin/ffprobe /app/bin/ffprobe-real +COPY --chmod=0755 ./apps/radarr/ffprobe /app/bin/ffprobe USER 568 diff --git a/apps/radarr/ffprobe b/apps/radarr/ffprobe new file mode 100644 index 0000000..041c40d Binary files /dev/null and b/apps/radarr/ffprobe differ diff --git a/apps/sonarr/Dockerfile b/apps/sonarr/Dockerfile index 3d5bbd5..5470135 100644 --- a/apps/sonarr/Dockerfile +++ b/apps/sonarr/Dockerfile @@ -1,61 +1,3 @@ -FROM --platform=linux/amd64 alpine:latest as cloner - -RUN apk update && apk upgrade && \ - apk add --no-cache git - -RUN git clone https://github.com/elfhosted/ffprobe-shim.git /source - -############# importarr -FROM --platform=linux/amd64 golang:1.24-bullseye AS importarr - -# Install necessary build tools and SQLite dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc libc6-dev sqlite3 libsqlite3-dev musl musl-dev musl-tools gcc-multilib git && \ - rm -rf /var/lib/apt/lists/* - -RUN ln -s /usr/bin/musl-gcc /usr/bin/x86_64-linux-musl-gcc - -# Set environment variables -ENV CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc - -RUN git clone https://github.com/elfhosted/importarr.git /app - -# Set the working directory -WORKDIR /app - -# Copy the Go module files and download dependencies -RUN go mod download - -# Build the Go binary -RUN go build -ldflags="-linkmode external -extldflags -static" -o importarr cmd/main.go - -####### and the final arr -FROM golang:1.24-alpine AS builder - -# Install git for fetching dependencies -RUN apk add --no-cache git - -# Set working directory -WORKDIR /app - -# Copy go.mod and go.sum first to leverage Docker cache -COPY --from=cloner /source/go.mod go.sum* ./ - -# Initialize module if go.mod doesn't exist -RUN if [ ! -f go.mod ]; then \ - go mod init ffprobe-shim && \ - go get github.com/middelink/go-parse-torrent-name; \ - else \ - go get github.com/middelink/go-parse-torrent-name; \ - fi - -# Copy source code -COPY --from=cloner /source/*.go ./ - -# Add a build argument to bust the cache -ARG CACHE_BUSTER=1 -RUN echo "Cache Buster: $CACHE_BUSTER" && CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ffprobe - FROM ghcr.io/ipromknight/alpine:rolling ARG TARGETPLATFORM @@ -95,10 +37,7 @@ RUN \ && rm -rf /tmp/* RUN mv /app/ffprobe /app/ffprobe-real -COPY --from=builder /app/ffprobe /app/ffprobe - -COPY --from=importarr /app/importarr /usr/local/bin/importarr -RUN chmod +x /usr/local/bin/importarr +COPY --chmod=0755 ./apps/sonarr/ffprobe /app/ffprobe USER 568 ENV REAL_FFPROBE_PATH=/app/ffprobe-real diff --git a/apps/sonarr/ffprobe b/apps/sonarr/ffprobe new file mode 100644 index 0000000..041c40d Binary files /dev/null and b/apps/sonarr/ffprobe differ