native sqlite
This commit is contained in:
12
dockerfile
12
dockerfile
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user