You've already forked go-totp
Dockerize everything!
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM golang:1.14-buster 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 ./static /app/static
|
||||
COPY ./templates /app/templates
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/app/go-totp"]
|
Reference in New Issue
Block a user