add a docker build for driftcl & badge in readme
parent
e70f03dd93
commit
5bf0b772ba
|
@ -0,0 +1,4 @@
|
|||
bin/
|
||||
Dockerfile
|
||||
.cache
|
||||
**/*.golden.json
|
|
@ -0,0 +1,20 @@
|
|||
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"
|
||||
ENV HOME=/app
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /go/src/app/bin/driftctl_${OS}_${ARCH} /bin/driftctl
|
||||
ENTRYPOINT ["/bin/driftctl"]
|
|
@ -8,7 +8,12 @@
|
|||
<img src="https://img.shields.io/github/downloads/cloudskiff/driftctl/total.svg"/>
|
||||
<a href="https://codecov.io/gh/cloudskiff/driftctl">
|
||||
<img src="https://codecov.io/gh/cloudskiff/driftctl/branch/main/graph/badge.svg?token=8C5R02G5S7"/>
|
||||
</a><br>
|
||||
</a>
|
||||
<img src="https://img.shields.io/docker/pulls/cloudskiff/driftctl"/>
|
||||
<img src="https://img.shields.io/microbadger/layers/cloudskiff/driftctl"/>
|
||||
<img src="https://img.shields.io/docker/image-size/cloudskiff/driftctl"/>
|
||||
|
||||
<br>
|
||||
Measures infrastructure as code coverage, and tracks infrastructure drift.<br>
|
||||
:warning: <strong>This tool is still in beta state and will evolve in the future with potential breaking changes</strong> :warning:
|
||||
</p>
|
||||
|
|
|
@ -32,6 +32,12 @@ os_archs=(
|
|||
windows/amd64
|
||||
)
|
||||
|
||||
if [ -n "$OS_ARCH" ]; then
|
||||
os_archs=("$OS_ARCH")
|
||||
fi
|
||||
|
||||
echo "ARCH: $os_archs"
|
||||
|
||||
if [ $ENV != "release" ]; then
|
||||
echo "+ Building env: dev"
|
||||
# If its dev mode, only build for ourself
|
||||
|
|
Loading…
Reference in New Issue