commit 14baca1770a8f6369d4e9ddfcf94a31fc61df007
Author: Matthias Kesler <krombel@krombel.de>
Date: Thu Dec 18 09:53:02 2025 +0000
diff --git a/.dockerignore b/.dockerignore
index c7f78fd..17f3af8 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -12 +14 @@
Dockerfile
tgs.Dockerfile
+docs/
+README.md
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index e67c810..760bebe 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -577 +577 @@ jobs:
- platforms: linux/amd64,linux/arm64
+ platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
diff --git a/Dockerfile b/Dockerfile
index 366a5a4..4f349e4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19 +114 @@
-FROM alpine AS builder
+FROM golang:alpine AS builder
+
+# allow to cache the go mod download
+COPY go.mod go.sum ./
+RUN go mod download
COPY . /go/src/matterbridge
-RUN apk --no-cache add go git \
- && cd /go/src/matterbridge \
- && CGO_ENABLED=0 go build -ldflags "-X github.com/matterbridge-org/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
+
+RUN apk --no-cache add git
+RUN cd /go/src/matterbridge && \
+ CGO_ENABLED=0 go build -ldflags "-X github.com/matterbridge-org/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
FROM alpine
RUN apk --no-cache add ca-certificates mailcap