diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dcf7abf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,85 @@ +name: ci + +on: + workflow_dispatch: + push: + schedule: + - cron: "0 7 7 * *" + +jobs: + set-date: + runs-on: ubuntu-latest + outputs: + date: ${{ steps.date.outputs.DATE }} + steps: + - name: Set Date + id: date + run: echo "DATE=$(date +"%m-%Y")" >> $GITHUB_OUTPUT + + base: + needs: set-date + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc:${{ needs.set-date.outputs.date }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + secrets: inherit + + alpine: + needs: set-date + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.alpine + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-alpine:edge,${{ vars.DOCKERHUB_USERNAME }}/boinc-alpine:${{ needs.set-date.outputs.date }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + secrets: inherit + + AMD: + needs: set-date + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.amd + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-amd:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-amd:${{ needs.set-date.outputs.date }} + secrets: inherit + + intel: + needs: + - set-date + - base + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.intel + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-intel:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-intel:${{ needs.set-date.outputs.date }} + platforms: linux/amd64 + secrets: inherit + + virtualbox: + needs: + - set-date + - base + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.virtualbox + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-virtualbox:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-virtualbox:${{ needs.set-date.outputs.date }} + platforms: linux/amd64 + secrets: inherit + + nvidia: + needs: set-date + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.nvidia + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-nvidia:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-nvidia:${{ needs.set-date.outputs.date }} + platforms: linux/amd64,linux/arm64 + secrets: inherit + + multi-gpu: + needs: + - set-date + - nvidia + uses: ./.github/workflows/docker-build.yml + with: + dockerfile: Dockerfile.multi-gpu + tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-multi-gpu:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-multi-gpu:${{ needs.set-date.outputs.date }} + platforms: linux/amd64 + secrets: inherit diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..4bf8f65 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,42 @@ +name: docker-build + +on: + workflow_call: + inputs: + dockerfile: + required: true + type: string + tag: + required: true + type: string + platforms: + required: false + default: linux/amd64 + type: string + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: ${{ inputs.platforms }} + push: true + tags: ${{ inputs.tag }} + file: ${{ inputs.dockerfile }} diff --git a/Dockerfile.base-ubuntu b/Dockerfile similarity index 94% rename from Dockerfile.base-ubuntu rename to Dockerfile index 75b593a..b5bc24d 100644 --- a/Dockerfile.base-ubuntu +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL maintainer="BOINC" \ ENV BOINC_GUI_RPC_PASSWORD="123" \ BOINC_REMOTE_HOST="127.0.0.1" \ BOINC_CMD_LINE_OPTIONS="" \ - DEBIAN_FRONTEND=noninteractive + DEBIAN_FRONTEND=noninteractive # Copy files COPY bin/ /usr/bin/ @@ -23,7 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install PPA dependency software-properties-common \ # Install Time Zone Database - tzdata && \ + tzdata && \ # Install BOINC Client add-apt-repository -y ppa:costamagnagianfranco/boinc && \ apt-get update && apt-get install -y --no-install-recommends \ diff --git a/Dockerfile.base-alpine b/Dockerfile.alpine similarity index 63% rename from Dockerfile.base-alpine rename to Dockerfile.alpine index 55afb81..2134760 100644 --- a/Dockerfile.base-alpine +++ b/Dockerfile.alpine @@ -1,7 +1,3 @@ -########################################################################################## -# IMPORTANT: Alpine uses musl instead of glibc, therefore projects might not support it. # -########################################################################################## - FROM alpine:edge LABEL maintainer="BOINC" \ @@ -24,8 +20,8 @@ EXPOSE 31416 # Install RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ # Install Time Zone Database - tzdata \ + tzdata \ # Install BOINC Client - boinc + boinc CMD ["start-boinc.sh"] diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 deleted file mode 100644 index 97d874a..0000000 --- a/Dockerfile.arm32v7 +++ /dev/null @@ -1,31 +0,0 @@ -FROM arm32v7/ubuntu:rolling - -LABEL maintainer="BOINC" \ - description="A lightweight BOINC client on ARMv7 32-bit architecture." - -# Global environment settings -ENV BOINC_GUI_RPC_PASSWORD="123" \ - BOINC_REMOTE_HOST="127.0.0.1" \ - BOINC_CMD_LINE_OPTIONS="" \ - DEBIAN_FRONTEND=noninteractive - -# Copy files -COPY bin/ /usr/bin/ - -# Configure -WORKDIR /var/lib/boinc - -# BOINC RPC port -EXPOSE 31416 - -# Install -RUN apt-get update && apt-get install -y --no-install-recommends \ -# Install Time Zone Database - tzdata \ -# Install BOINC Client - boinc-client && \ -# Cleaning up - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* - -CMD ["start-boinc.sh"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 deleted file mode 100644 index 218e407..0000000 --- a/Dockerfile.arm64v8 +++ /dev/null @@ -1,31 +0,0 @@ -FROM arm64v8/ubuntu:rolling - -LABEL maintainer="BOINC" \ - description="A lightweight BOINC client on ARMv8 64-bit architecture." - -# Global environment settings -ENV BOINC_GUI_RPC_PASSWORD="123" \ - BOINC_REMOTE_HOST="127.0.0.1" \ - BOINC_CMD_LINE_OPTIONS="" \ - DEBIAN_FRONTEND=noninteractive - -# Copy files -COPY bin/ /usr/bin/ - -# Configure -WORKDIR /var/lib/boinc - -# BOINC RPC port -EXPOSE 31416 - -# Install -RUN apt-get update && apt-get install -y --no-install-recommends \ -# Install Time Zone Database - tzdata \ -# Install BOINC Client - boinc-client && \ -# Cleaning up - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* - -CMD ["start-boinc.sh"] diff --git a/Dockerfile.intel b/Dockerfile.intel index 0db59c2..c888e88 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -1,4 +1,4 @@ -FROM boinc/client:base-ubuntu +FROM boinc/boinc:latest LABEL maintainer="BOINC" \ description="Intel GPU-savvy BOINC client." diff --git a/Dockerfile.multi-gpu b/Dockerfile.multi-gpu index 1fd036b..e40e180 100644 --- a/Dockerfile.multi-gpu +++ b/Dockerfile.multi-gpu @@ -1,4 +1,4 @@ -FROM boinc/client:nvidia +FROM boinc/boinc-nvidia:latest LABEL maintainer="BOINC" \ description="Multi GPU-savvy (Intel 5th gen+ & Nvidia) BOINC client." diff --git a/Dockerfile.nvidia b/Dockerfile.nvidia index 244e54b..dd99867 100644 --- a/Dockerfile.nvidia +++ b/Dockerfile.nvidia @@ -7,7 +7,7 @@ LABEL maintainer="BOINC" \ ENV BOINC_GUI_RPC_PASSWORD="123" \ BOINC_REMOTE_HOST="127.0.0.1" \ BOINC_CMD_LINE_OPTIONS="" \ - DEBIAN_FRONTEND=noninteractive + DEBIAN_FRONTEND=noninteractive # Copy files COPY bin/ /usr/bin/ @@ -23,7 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install PPA dependency software-properties-common \ # Install Time Zone Database - tzdata && \ + tzdata && \ # Install BOINC Client add-apt-repository -y ppa:costamagnagianfranco/boinc && \ apt-get update && apt-get install -y --no-install-recommends \ diff --git a/Dockerfile.virtualbox b/Dockerfile.virtualbox index 583dddc..e58ac2c 100644 --- a/Dockerfile.virtualbox +++ b/Dockerfile.virtualbox @@ -1,4 +1,4 @@ -FROM boinc/client:base-ubuntu +FROM boinc/boinc:latest LABEL maintainer="BOINC" \ description="VirtualBox-savvy BOINC client."