2020-12-11 16:12:22 +00:00
|
|
|
FROM golang:1.15.2 AS builder
|
|
|
|
|
|
|
|
ARG OS="linux"
|
|
|
|
ARG ARCH="amd64"
|
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY go.mod go.sum Makefile ./
|
|
|
|
RUN make deps
|
|
|
|
COPY . .
|
|
|
|
RUN OS_ARCH=${OS}/${ARCH} make release
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/base-debian10
|
|
|
|
|
|
|
|
ARG OS="linux"
|
|
|
|
ARG ARCH="amd64"
|
2021-01-05 10:27:11 +00:00
|
|
|
ENV HOME=/home
|
2020-12-11 16:12:22 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /go/src/app/bin/driftctl_${OS}_${ARCH} /bin/driftctl
|
|
|
|
ENTRYPOINT ["/bin/driftctl"]
|