by siddontang · 4y ago · 0 comments
an example Dockerfile likes:
FROM golang:1.18.1-alpine as builder
# RUN apk add, wget, etc, and build the binary
FROM alpine
# or FROM scratch
COPY --from=builder builder/binary /binary
ENTRYPOINT ["/binary"]Dev tools like bash, ls, grep, etc, have no place in production and only increase attack surface.
https://kubernetes.io/docs/tasks/debug/debug-application/deb...
I usually just include a shell, but to each their own.
[0] https://stackoverflow.com/questions/47722898/how-to-do-a-doc...