Skip to content

Commit

Permalink
Merge pull request #24622 from Koenkk/fix/update-alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk authored Dec 11, 2024
2 parents bf340b5 + b2f1e48 commit 33c4441
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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/386,linux/amd64,linux/arm/v6,linux/arm/v7
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7
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/386,linux/amd64,linux/arm/v6,linux/arm/v7
platforms: linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7
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
14 changes: 11 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
FROM alpine:3.18.4 AS base
ARG TARGETPLATFORM

# Need to use Alpine 3.18.4 which uses Node 18 for arm/v6 and arm/v7, otherwise the build hangs.
# See https://github.com/nodejs/docker-node/issues/2077
FROM alpine:3.18.4 AS arm-alpine
FROM alpine:3.21 AS arm64-alpine
FROM alpine:3.21 AS amd64-alpine

FROM ${TARGETARCH}-alpine AS base

ENV NODE_ENV=production
WORKDIR /app
Expand All @@ -8,7 +16,7 @@ RUN apk add --no-cache tzdata eudev tini nodejs
FROM base AS deps

COPY package.json pnpm-lock.yaml ./
RUN apk add make gcc g++ python3 linux-headers npm && \
RUN apk add npm && \
npm install -g pnpm && \
pnpm install --frozen-lockfile --no-optional

Expand All @@ -18,7 +26,7 @@ FROM base AS release
ARG DATE
ARG VERSION
LABEL org.opencontainers.image.authors="Koen Kanters"
LABEL org.opencontainers.image.title="zigbee2mqtt"
LABEL org.opencontainers.image.title="Zigbee2MQTT"
LABEL org.opencontainers.image.description="Zigbee to MQTT bridge using Zigbee-herdsman"
LABEL org.opencontainers.image.url="https://github.com/Koenkk/zigbee2mqtt"
LABEL org.opencontainers.image.documentation="https://www.zigbee2mqtt.io/"
Expand Down

0 comments on commit 33c4441

Please sign in to comment.