go-totp/Dockerfile

20 lines
473 B
Docker
Raw Permalink Normal View History

2020-09-15 09:06:32 +00:00
FROM golang:1.14-alpine AS builder
2020-09-15 08:29:41 +00:00
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
2020-09-15 08:29:41 +00:00
FROM scratch
2020-09-15 08:29:41 +00:00
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
2020-09-15 08:29:41 +00:00
EXPOSE 8080
WORKDIR /app
2020-09-15 08:29:41 +00:00
ENTRYPOINT ["/app/go-totp"]