We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0670fe commit 571d6fbCopy full SHA for 571d6fb
1 file changed
Dockerfile
@@ -1,5 +1,5 @@
1
# Build stage
2
-FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
+FROM golang:1.21-alpine AS builder
3
4
# Install build dependencies
5
RUN apk add --no-cache gcc musl-dev
@@ -13,12 +13,8 @@ RUN go mod download
13
# Copy source code
14
COPY . .
15
16
-# Build arguments for cross-compilation
17
-ARG TARGETOS
18
-ARG TARGETARCH
19
-
20
-# Build the application
21
-RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o puter2api .
+# Build the application (CGO required for sqlite3)
+RUN CGO_ENABLED=1 go build -ldflags="-s -w" -o puter2api .
22
23
# Runtime stage
24
FROM alpine:latest
0 commit comments