1
0
Fork 0

add root Dockerfile which will build all binaries

gh-v1-backup
Brian Picciano 5 years ago
parent 7a5ac9caa0
commit 6cd61c60f7
  1. 1
      .dockerignore
  2. 11
      Dockerfile
  3. 5
      cmd/totp-proxy/Dockerfile

@ -0,0 +1 @@
Dockerfile

@ -0,0 +1,11 @@
FROM golang:1.12 AS builder
WORKDIR /app
COPY . .
RUN GOBIN=$(pwd)/bin CGO_ENABLED=0 GOOS=linux go install -a -installsuffix cgo ./cmd/...
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app/bin
COPY --from=builder /app/bin /app/bin
ENV PATH="/app/bin:${PATH}"
CMD echo "Available commands:" && ls

@ -1,5 +0,0 @@
FROM alpine
RUN apk --update upgrade && apk add curl ca-certificates && \
update-ca-certificates && rm -rf /var/cache/apk/*
ADD totp-proxy /totp-proxy
CMD /totp-proxy
Loading…
Cancel
Save