mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
9922265454
Former-commit-id: c563c4f1ffa98705829e14b189a6976c3a6aa898
17 lines
341 B
Docker
17 lines
341 B
Docker
# docker build -t app .
|
|
# docker run --rm -it -p 8080:8080 app:latest
|
|
FROM golang:latest AS builder
|
|
RUN apt-get update
|
|
ENV GO111MODULE=on \
|
|
CGO_ENABLED=0 \
|
|
GOOS=linux \
|
|
GOARCH=amd64
|
|
WORKDIR /go/src/app
|
|
COPY go.mod .
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN go install
|
|
|
|
FROM scratch
|
|
COPY --from=builder /go/bin/app .
|
|
ENTRYPOINT ["./app"] |