native sqlite

This commit is contained in:
JurajKubrican
2024-12-30 21:39:21 +01:00
parent ff0df644af
commit e7a353943c
4 changed files with 63 additions and 16 deletions

View File

@@ -1,10 +1,5 @@
# Step 1: Build the Go binary in a separate stage
FROM golang:1.23-alpine AS builder
RUN apk update; apk add --no-cache gcc musl-dev
ENV GCO_ENABLED=1
# ENV GOOS=linux
# ENV GOARCH=amd64
FROM golang:1.23 AS builder
# Set the working directory
WORKDIR /app
@@ -14,11 +9,12 @@ COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the application code
COPY . .
COPY ./src ./src
# Build the Go binary with static linking for Linux
RUN go build -o /server ./src
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server ./src
COPY ./views ./views
FROM scratch