go-totp/Dockerfile

20 lines
610 B
Docker
Raw 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
2020-09-15 09:06:32 +00:00
#RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix gco -ldflags="-w -s" -o /go/bin/go-totp
RUN go build -o /go/bin/go-totp
2020-09-15 08:29:41 +00:00
2020-09-15 09:06:32 +00:00
FROM alpine
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
2020-09-15 09:06:32 +00:00
COPY --from=builder /go/src/git.bjphoster.com/bryanpedini/go-totp/templates /app/templates
COPY --from=builder /go/src/git.bjphoster.com/bryanpedini/go-totp/static /app/static
2020-09-15 08:29:41 +00:00
EXPOSE 8080
ENTRYPOINT ["/app/go-totp"]