docker build.sh teeny 4mb img woo
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM golang:1.21-bullseye as builder
|
||||||
|
|
||||||
|
COPY . /go/src/app
|
||||||
|
WORKDIR /go/src/app
|
||||||
|
RUN GOOS=linux CGO_ENABLED=0 go build -o /bin/app -a -installsuffix cgo -trimpath -ldflags "-s -w" -tags musl
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /bin/app /bin/
|
||||||
|
CMD []
|
||||||
|
ENTRYPOINT ["/bin/app"]
|
||||||
Reference in New Issue
Block a user