chore(deps): Update dependencies (#42)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
# Define argument for linker flags
|
||||
ARG LDFLAGS=-s -w
|
||||
|
||||
# Use Bun container for building the React UI
|
||||
FROM oven/bun:1 as ui-builder
|
||||
FROM oven/bun:1 AS ui-builder
|
||||
|
||||
# Set the working directory for the React UI
|
||||
WORKDIR /app
|
||||
@@ -19,11 +16,11 @@ COPY webui/react-ui/ ./
|
||||
# Build the React UI
|
||||
RUN bun run build
|
||||
|
||||
# Use a temporary build image based on Golang 1.22-alpine
|
||||
FROM golang:1.22-alpine as builder
|
||||
# Use a temporary build image based on Golang 1.24-alpine
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
# Set environment variables: linker flags and disable CGO
|
||||
ENV LDFLAGS=$LDFLAGS CGO_ENABLED=0
|
||||
# Define argument for linker flags
|
||||
ARG LDFLAGS="-s -w"
|
||||
|
||||
# Install git
|
||||
RUN apk add --no-cache git
|
||||
@@ -45,7 +42,7 @@ COPY . .
|
||||
COPY --from=ui-builder /app/dist /work/webui/react-ui/dist
|
||||
|
||||
# Build the application
|
||||
RUN go build -ldflags="$LDFLAGS" -o localagi ./
|
||||
RUN CGO_ENABLED=0 go build -ldflags="$LDFLAGS" -o localagi ./
|
||||
|
||||
FROM scratch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user