Configure for docker compose

This commit is contained in:
Ben Sarmiento
2023-10-20 19:32:53 +02:00
parent cd6b94f868
commit e361807119
3 changed files with 62 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# Build stage
FROM golang:1-alpine AS builder
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 go build -o zurg cmd/zurg/main.go
# Obfuscation stage
FROM alpine:3 AS obfuscator
WORKDIR /app
COPY --from=builder /app/zurg .
RUN apk add --no-cache upx
RUN upx --brute zurg
# Final stage
FROM alpine:3
WORKDIR /app
COPY --from=obfuscator /app/zurg .
ENTRYPOINT ["./zurg"]