fix: Dockerfile uses thevlang/vlang:alpine container (pre-built V)
CI / test (push) Successful in 2m35s
CI / test (push) Successful in 2m35s
Building V from source on Alpine fails due to C function redefinition (musl libc). Use the official V Alpine container which has a pre-built, compatible V compiler.
This commit is contained in:
+4
-12
@@ -1,20 +1,12 @@
|
||||
# ── Build stage: compile ntfy-bridge from source ──────────────────────────
|
||||
FROM alpine:3.20 AS builder
|
||||
|
||||
RUN apk add --no-cache gcc musl-dev git make
|
||||
|
||||
# Build V from source, pinned to V 0.5.2 commit
|
||||
RUN git clone https://github.com/vlang/v /opt/v
|
||||
WORKDIR /opt/v
|
||||
RUN git checkout 45ae01d23168b6372f734eeb38a77360bbcf184a
|
||||
RUN make
|
||||
# ── Build: use official V container to compile ────────────────────────────
|
||||
FROM thevlang/vlang:alpine AS builder
|
||||
|
||||
# Copy project source and build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN /opt/v/v -prod -o /ntfy-bridge .
|
||||
RUN v -prod -o /ntfy-bridge .
|
||||
|
||||
# ── Runtime stage: minimal image ───────────────────────────────────────────
|
||||
# ── Runtime: minimal image ────────────────────────────────────────────────
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata curl
|
||||
|
||||
Reference in New Issue
Block a user