add root Dockerfile which will build all binaries
This commit is contained in:
parent
7a5ac9caa0
commit
6cd61c60f7
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
Dockerfile
|
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -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…
Reference in New Issue
Block a user