mirror of
https://github.com/kataras/iris.git
synced 2026-01-22 03:15:58 +00:00
more features and fix database/mysql:jwt example
This commit is contained in:
18
_examples/auth/basicauth/database/Dockerfile
Normal file
18
_examples/auth/basicauth/database/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
# cache step
|
||||
COPY . .
|
||||
RUN go install
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /go/bin/myapp .
|
||||
ENTRYPOINT ["./myapp"]
|
||||
Reference in New Issue
Block a user