mirror of
https://github.com/kataras/iris.git
synced 2025-12-31 16:57:04 +00:00
add a simple docker example
Former-commit-id: cacfa3ad903ce542ce455cb2298c40639c645d3c
This commit is contained in:
15
_examples/docker/Dockerfile
Normal file
15
_examples/docker/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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/src/app
|
||||
RUN go install
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /go/bin/app .
|
||||
ENTRYPOINT ["./app"]
|
||||
Reference in New Issue
Block a user