Optimizations
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
# Accept GOOS and GOARCH as build arguments
|
||||
ARG GOOS=linux
|
||||
ARG GOARCH=amd64
|
||||
|
||||
# Build stage
|
||||
FROM golang:1-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o zurg cmd/zurg/main.go
|
||||
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -ldflags="-s -w" -o zurg cmd/zurg/main.go
|
||||
|
||||
# Obfuscation stage
|
||||
FROM alpine:3 AS obfuscator
|
||||
|
||||
Reference in New Issue
Block a user