Compare commits

...

2 Commits

Author SHA1 Message Date
RecordingTheSmile 18fc1cee7a fix: remove redundant line in Dockerfile build command 2025-11-02 22:39:33 +08:00
RecordingTheSmile edefba7e32 feat: update Dockerfile to include shared object files and improve build process 2025-11-02 22:34:43 +08:00
2 changed files with 4 additions and 3 deletions
+4 -3
View File
@@ -1,17 +1,18 @@
FROM golang:alpine as backend-builder
FROM golang:alpine AS backend-builder
WORKDIR /build
COPY . .
RUN go build -ldflags="-s -w" -o bin/server cmd/server
RUN go build -ldflags="-s -w" -o bin/server
RUN apk add --no-cache upx
RUN upx --best --lzma bin/server
FROM alpine:latest
RUN apk add --no-cache onnxruntime
COPY --from=backend-builder /build/bin/server /app/server
COPY static /app/static
COPY static/*.so /app/
WORKDIR /app
EXPOSE 8080
RUN ls -a
CMD ["./server"]
Binary file not shown.