feat(server): add Dockerfile.fast and scripts for fast host-compiled builds

- Add Dockerfile.fast which packages a pre-built binary instead of compiling inside the container.
- Add scripts/build-fast.ps1 (PowerShell) and scripts/build-fast.sh (Bash) to automate local cross-compilation (CGO_ENABLED=0 GOOS=linux) and Docker packaging.
- Set executable bit for build-fast.sh.
This commit is contained in:
x0gp
2026-07-06 22:04:28 +04:00
parent 76e33cfe62
commit e5155c8a42
3 changed files with 95 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# Dockerfile.fast — Fast packaging of a pre-compiled local binary
FROM alpine:3.19
# Add CA certificates and timezone data
RUN apk --no-cache add ca-certificates tzdata
WORKDIR /app
# Copy the pre-compiled binary from the host
ARG BINARY_PATH
COPY ${BINARY_PATH} /app/poc-server
# Set execution permissions
RUN chmod +x /app/poc-server
# Expose server ports
EXPOSE 8080
ENTRYPOINT ["/app/poc-server"]