We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f965c6 commit e419164Copy full SHA for e419164
scripts/Dockerfile
@@ -1,11 +1,13 @@
1
FROM golang:1.24-alpine AS backend
2
WORKDIR /backend-build
3
-
+COPY go.mod go.sum ./
4
+RUN go mod download
5
COPY . .
6
# Please build frontend first, so that the static files are available.
7
# Refer to `pnpm release` in package.json for the build command.
8
-RUN go build -o memos ./bin/memos/main.go
+RUN --mount=type=cache,target=/go/pkg/mod \
9
+ --mount=type=cache,target=/root/.cache/go-build \
10
+ go build -ldflags="-s -w" -o memos ./bin/memos/main.go
11
12
# Make workspace with above generated files.
13
FROM alpine:latest AS monolithic
0 commit comments