Skip to content

Commit

Permalink
feat: Docker: RISC-V support (#22824)
Browse files Browse the repository at this point in the history
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent 32c341c commit e23d300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
with:
context: .
file: docker/Dockerfile
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64
tags: koenkk/zigbee2mqtt:latest-dev,ghcr.io/koenkk/zigbee2mqtt:latest-dev
push: true
build-args: |
Expand All @@ -92,7 +92,7 @@ jobs:
context: .
file: docker/Dockerfile
provenance: false
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/riscv64
tags: koenkk/zigbee2mqtt:latest,ghcr.io/koenkk/zigbee2mqtt:latest,koenkk/zigbee2mqtt:${{ github.ref_name }},ghcr.io/koenkk/zigbee2mqtt:${{ github.ref_name }}
push: true
build-args: |
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG TARGETPLATFORM
FROM alpine:3.18.4 AS arm-alpine
FROM alpine:3.21 AS arm64-alpine
FROM alpine:3.21 AS amd64-alpine
FROM alpine:3.21 as riscv64-alpine

Check warning on line 8 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / ci

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

FROM ${TARGETARCH}-alpine AS base

Expand All @@ -16,6 +17,7 @@ RUN apk add --no-cache tzdata eudev tini nodejs
FROM base AS deps

COPY package.json pnpm-lock.yaml ./
# Make and such are needed to compile serialport for riscv64
RUN apk add make gcc g++ python3 linux-headers npm && \
npm install -g pnpm && \
pnpm install --frozen-lockfile --no-optional
Expand Down

0 comments on commit e23d300

Please sign in to comment.