Skip to content

Instantly share code, notes, and snippets.

View deeGraYve's full-sized avatar
🔥
here be dragons

Dmitry Golomidov deeGraYve

🔥
here be dragons
View GitHub Profile
@MatthewJamesBoyle
MatthewJamesBoyle / DOCKERFILE
Last active March 11, 2024 15:57
production go dockerfile
FROM golang:1.21.0-bullseye as builder
COPY . /workdir
WORKDIR /workdir
ENV CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all"
ENV GOFLAGS="-buildmode=pie"
RUN go build -ldflags "-s -w" -trimpath ./cmd/app