Optimizations

This commit is contained in:
Ben Sarmiento
2023-10-22 11:26:20 +02:00
parent 7009d78003
commit c789ebc96d
8 changed files with 61 additions and 237 deletions

View File

@@ -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