fix: output api binary to /tmp to avoid conflict with api/ directory

This commit is contained in:
2026-04-09 19:15:58 +02:00
parent c12b0dcbc2
commit 6dba7c6dc6

View File

@@ -4,10 +4,10 @@ RUN apk add --no-cache gcc musl-dev
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -o api ./api/main.go
RUN CGO_ENABLED=1 GOOS=linux go build -o /tmp/api ./api/main.go
FROM alpine:3.21
RUN apk add --no-cache libc6-compat
WORKDIR /root/
COPY --from=builder /app/api ./api
COPY --from=builder /tmp/api ./api
CMD ["./api"]