🐳 Created simple Dockerfile
This commit is contained in:
parent
567180570e
commit
cf6ec85609
|
@ -0,0 +1,24 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# docker build --rm -f build/Dockerfile -t source.toby3d.me/toby3d/playground .
|
||||
|
||||
# Build
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
COPY go.mod *.go ./
|
||||
|
||||
RUN go build -o ./hello
|
||||
|
||||
# Run
|
||||
FROM scratch
|
||||
|
||||
WORKDIR /
|
||||
|
||||
COPY --from=builder /app/hello /hello
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/hello"]
|
Loading…
Reference in New Issue