3 Commits

Author SHA1 Message Date
894a6f01c2 fix: add gcc
All checks were successful
Build and Push Docker Images / build-and-push-backend (push) Successful in 1m4s
Build and Push Docker Images / build-and-push-frontend (push) Successful in 6s
2026-01-31 01:32:32 +01:00
9896850b49 fix: force CGO
Some checks failed
Build and Push Docker Images / build-and-push-backend (push) Failing after 13s
Build and Push Docker Images / build-and-push-frontend (push) Successful in 8s
2026-01-31 01:30:43 +01:00
48f4423986 fix: Dockerfile cgo
All checks were successful
Build and Push Docker Images / build-and-push-backend (push) Successful in 16s
Build and Push Docker Images / build-and-push-frontend (push) Successful in 7s
2026-01-31 01:21:43 +01:00

View File

@@ -5,6 +5,10 @@ WORKDIR /app
# Copy go.mod and go.sum files to download dependencies # Copy go.mod and go.sum files to download dependencies
COPY go.mod go.sum ./ COPY go.mod go.sum ./
# Install the C compiler (gcc) and other build tools needed for CGO
RUN apk add --no-cache build-base
RUN go mod download RUN go mod download
# Copy the rest of the application source code # Copy the rest of the application source code
@@ -13,7 +17,7 @@ COPY . .
# Build the application # Build the application
# CGO_ENABLED=0 is important for a clean static build for Alpine # CGO_ENABLED=0 is important for a clean static build for Alpine
# -o main specifies the output file name # -o main specifies the output file name
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . RUN CGO_ENABLED=1 go build -o main .
# Stage 2: Create the final lightweight image # Stage 2: Create the final lightweight image
FROM alpine:latest FROM alpine:latest