mirror of
https://github.com/IS1DI/x0gp.git
synced 2026-07-16 20:47:55 +00:00
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:
@@ -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"]
|
||||
Reference in New Issue
Block a user