iris/_examples/tutorial/docker/Dockerfile
Gerasimos (Makis) Maropoulos cc19f80049 update some examples
Former-commit-id: 2ed7c323dd379eb68d5ccb2044cd9cc772ce0b08
2020-05-05 22:03:01 +03:00

17 lines
345 B
Docker

# docker build -t myapp .
# docker run --rm -it -p 8080:8080 myapp: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"]