+4
-4
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.26-alpine AS go-builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS go-builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache bash curl unzip upx
|
||||
|
||||
@@ -16,12 +16,12 @@ RUN GOOS=windows GOARCH=amd64 go build -trimpath -ldflags='-s -w -buildid=' -o /
|
||||
RUN cp /out/tsrun-linux /out/tsrun-linux-upx && upx --best --lzma /out/tsrun-linux-upx
|
||||
RUN cp /out/tsrun.exe /out/tsrun-upx.exe && upx --best --lzma /out/tsrun-upx.exe
|
||||
|
||||
FROM oven/bun:1.3.14-alpine AS bun-builder
|
||||
FROM --platform=$BUILDPLATFORM oven/bun:1.3.14-alpine AS bun-builder
|
||||
WORKDIR /app
|
||||
COPY server ./server
|
||||
RUN bun build --target bun --outfile /out/server.js ./server/index.ts
|
||||
RUN bun build --target bun --minify --outfile /out/server.js ./server/index.ts
|
||||
|
||||
FROM oven/bun:1.3.14-alpine
|
||||
FROM --platform=linux/arm64 oven/bun:1.3.14-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=bun-builder /out/server.js ./server.js
|
||||
COPY --from=go-builder /out/tsrun-linux ./dist/tsrun-linux
|
||||
|
||||
Reference in New Issue
Block a user