20 lines
473 B
Docker
20 lines
473 B
Docker
FROM golang:1.14-alpine AS builder
|
|
|
|
WORKDIR ${GOPATH}/src/git.bjphoster.com/bryanpedini/go-totp
|
|
COPY . .
|
|
|
|
RUN go get -d -v
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix gco -ldflags="-w -s" -o /go/bin/go-totp
|
|
|
|
FROM scratch
|
|
LABEL maintainer="Bryan Joshua Pedini <b.pedini@bjphoster.com>"
|
|
|
|
COPY --from=builder /go/bin/go-totp /app/go-totp
|
|
COPY ./templates /app/templates
|
|
COPY ./static /app/static
|
|
|
|
EXPOSE 8080
|
|
|
|
WORKDIR /app
|
|
ENTRYPOINT ["/app/go-totp"]
|