Compare commits

..

3 Commits

Author SHA1 Message Date
RecordingTheSmile 40490ffe43 fix: update Dockerfile to install packages non-interactively 2025-11-06 21:31:02 +08:00
RecordingTheSmile 455b6d40de fix: update Dockerfile to include apt update before installing build-essential 2025-11-06 21:28:01 +08:00
RecordingTheSmile 62dcac103f fix: Docker构建统一使用debian镜像 2025-11-06 21:25:28 +08:00
2 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
FROM golang:alpine AS backend-builder
RUN apk add --no-cache build-base
FROM golang:latest AS backend-builder
RUN apt update
RUN apt install -y build-essential
WORKDIR /build
COPY . .
ENV CGO_ENABLED=1
RUN go build -ldflags="-s -w" -o bin/server
RUN apk add --no-cache upx
RUN apt install -y upx-ucl
RUN upx --best --lzma bin/server
+2 -2
View File
@@ -50,7 +50,7 @@ func Pass(err *error) {
if r := recover(); r != nil {
e, ok := errorx.ErrorFromPanic(r)
if ok {
*err = e
*err = oops.Wrap(e)
} else {
panic(r)
}
@@ -61,7 +61,7 @@ func HandleError(f func(error)) {
if r := recover(); r != nil {
e, ok := errorx.ErrorFromPanic(r)
if ok {
f(e)
f(oops.Wrap(e))
} else {
panic(r)
}