Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: Reduce Docker image size by avoiding duplicate binary copies

rcourtman652854af00c3
diff --git a/Dockerfile b/Dockerfile
index abec9e0a52..aa8db2a555 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -234,15 +234,11 @@ RUN apk --no-cache add ca-certificates tzdata su-exec openssh-client
WORKDIR /app
-# Copy all pulse binaries, then select the correct one for target architecture
-COPY --from=backend-builder /app/pulse-linux-* /tmp/
-RUN if [ "$TARGETARCH" = "arm64" ]; then \
- cp /tmp/pulse-linux-arm64 ./pulse; \
- else \
- cp /tmp/pulse-linux-amd64 ./pulse; \
- fi && \
- chmod +x ./pulse && \
- rm -rf /tmp/pulse-linux-*
+# Copy the correct pulse binary for target architecture directly
+# Use separate COPY commands with TARGETARCH to avoid copying both binaries
+# (copying to /tmp then deleting wastes space due to Docker layer immutability)
+COPY --from=backend-builder /app/pulse-linux-${TARGETARCH:-amd64} ./pulse
+RUN chmod +x ./pulse