Skip to content

Commit 19401cc

Browse files
committed
build multi arch image
1 parent 3d2ba52 commit 19401cc

File tree

12 files changed

+117
-139
lines changed

12 files changed

+117
-139
lines changed

.github/workflows/build.yml

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,72 @@
11
name: ci
22

33
on:
4+
workflow_dispatch:
45
push:
56

67
jobs:
7-
base:
8+
set-date:
89
runs-on: ubuntu-latest
10+
outputs:
11+
date: ${{ steps.date.outputs.DATE }}
912
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v4
12-
13-
- name: Login to Docker Hub
14-
uses: docker/login-action@v3
15-
with:
16-
username: ${{ vars.DOCKERHUB_USERNAME }}
17-
password: ${{ secrets.DOCKERHUB_TOKEN }}
18-
19-
- name: Set up QEMU
20-
uses: docker/setup-qemu-action@v3
21-
22-
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v3
24-
25-
- name: Build and push
26-
uses: docker/build-push-action@v6
27-
with:
28-
platforms: linux/amd64,linux/arm64
29-
push: true
30-
tags: user/app:latest
31-
file: Dockerfile
13+
- name: Set Date
14+
id: date
15+
run: echo "DATE=$(date +"%m-%Y")" >> $GITHUB_OUTPUT
16+
17+
base:
18+
needs: set-date
19+
uses: ./.github/workflows/docker-build.yml
20+
with:
21+
dockerfile: Dockerfile
22+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc:${{ needs.set-date.outputs.date }}
23+
platforms: linux/amd64,linux/arm64,linux/arm/v7
24+
secrets: inherit
25+
26+
alpine:
27+
needs: set-date
28+
uses: ./.github/workflows/docker-build.yml
29+
with:
30+
dockerfile: Dockerfile.alpine
31+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-alpine:edge,${{ vars.DOCKERHUB_USERNAME }}/boinc-alpine:${{ needs.set-date.outputs.date }}
32+
platforms: linux/amd64,linux/arm64,linux/arm/v7
33+
secrets: inherit
34+
35+
AMD:
36+
needs: set-date
37+
uses: ./.github/workflows/docker-build.yml
38+
with:
39+
dockerfile: Dockerfile.amd
40+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-amd:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-amd:${{ needs.set-date.outputs.date }}
41+
secrets: inherit
42+
43+
intel:
44+
needs:
45+
- set-date
46+
- base
47+
uses: ./.github/workflows/docker-build.yml
48+
with:
49+
dockerfile: Dockerfile.intel
50+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-intel:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-intel:${{ needs.set-date.outputs.date }}
51+
platforms: linux/amd64
52+
secrets: inherit
53+
54+
nvidia:
55+
needs: set-date
56+
uses: ./.github/workflows/docker-build.yml
57+
with:
58+
dockerfile: Dockerfile.nvidia
59+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-nvidia:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-nvidia:${{ needs.set-date.outputs.date }}
60+
platforms: linux/amd64,linux/arm64
61+
secrets: inherit
62+
63+
multi-gpu:
64+
needs:
65+
- set-date
66+
- nvidia
67+
uses: ./.github/workflows/docker-build.yml
68+
with:
69+
dockerfile: Dockerfile.multi-gpu
70+
tag: ${{ vars.DOCKERHUB_USERNAME }}/boinc-multi-gpu:latest,${{ vars.DOCKERHUB_USERNAME }}/boinc-multi-gpu:${{ needs.set-date.outputs.date }}
71+
platforms: linux/amd64
72+
secrets: inherit

.github/workflows/docker-build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: docker-build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
dockerfile:
7+
required: true
8+
type: string
9+
tag:
10+
required: true
11+
type: string
12+
platforms:
13+
required: false
14+
default: linux/amd64
15+
type: string
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v3
26+
with:
27+
username: ${{ vars.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v6
38+
with:
39+
platforms: ${{ inputs.platforms }}
40+
push: true
41+
tags: ${{ inputs.tag }}
42+
file: ${{ inputs.dockerfile }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:latest
22

33
LABEL maintainer="BOINC" \
44
description="Ubuntu base image for lightweight BOINC client."
@@ -7,7 +7,7 @@ LABEL maintainer="BOINC" \
77
ENV BOINC_GUI_RPC_PASSWORD="123" \
88
BOINC_REMOTE_HOST="127.0.0.1" \
99
BOINC_CMD_LINE_OPTIONS="" \
10-
DEBIAN_FRONTEND=noninteractive
10+
DEBIAN_FRONTEND=noninteractive
1111

1212
# Copy files
1313
COPY bin/ /usr/bin/
@@ -23,7 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2323
# Install PPA dependency
2424
software-properties-common \
2525
# Install Time Zone Database
26-
tzdata && \
26+
tzdata && \
2727
# Install BOINC Client
2828
add-apt-repository -y ppa:costamagnagianfranco/boinc && \
2929
apt-get update && apt-get install -y --no-install-recommends \
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##########################################################################################
2-
# IMPORTANT: Alpine uses musl instead of glibc, therefore projects might not support it. #
3-
##########################################################################################
4-
51
FROM alpine:edge
62

73
LABEL maintainer="BOINC" \
@@ -24,8 +20,8 @@ EXPOSE 31416
2420
# Install
2521
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
2622
# Install Time Zone Database
27-
tzdata \
23+
tzdata \
2824
# Install BOINC Client
29-
boinc
25+
boinc
3026

3127
CMD ["start-boinc.sh"]

Dockerfile.amd

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
####################################################################################################################
2-
# Install instructions: https://rocm.github.io/ROCmInstall.html #
3-
# ROCm Docker base image: https://github.com/RadeonOpenCompute/ROCm-docker/blob/master/dev/Dockerfile-ubuntu-22.04 #
4-
# ROCm Docker template: https://github.com/RadeonOpenCompute/ROCm-docker/blob/master/rocm-terminal/Dockerfile #
5-
####################################################################################################################
6-
FROM rocm/dev-ubuntu-22.04
1+
FROM rocm/dev-ubuntu-24.04
72

83
LABEL maintainer="BOINC" \
94
description="AMD OpenCL-savvy BOINC client."

Dockerfile.arm32v7

Lines changed: 0 additions & 31 deletions
This file was deleted.

Dockerfile.arm64v8

Lines changed: 0 additions & 31 deletions
This file was deleted.

Dockerfile.intel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM boinc/client:base-ubuntu
1+
FROM taknok/boinc:latest
22

33
LABEL maintainer="BOINC" \
44
description="Intel GPU-savvy BOINC client."

Dockerfile.intel-legacy

Lines changed: 0 additions & 21 deletions
This file was deleted.

Dockerfile.multi-gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM boinc/client:nvidia
1+
FROM taknok/boinc-nvidia:latest
22

33
LABEL maintainer="BOINC" \
44
description="Multi GPU-savvy (Intel 5th gen+ & Nvidia) BOINC client."

0 commit comments

Comments
 (0)