File tree Expand file tree Collapse file tree 3 files changed +47
-2
lines changed Expand file tree Collapse file tree 3 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 32
32
Dockerfile : [Dockerfile]
33
33
suffix : [""]
34
34
latest : ["auto"]
35
- include : []
35
+ include :
36
+ - Dockerfile : Dockerfile.azcli
37
+ suffix : -azcli
38
+ latest : false
36
39
runs-on : ubuntu-latest
37
40
steps :
38
41
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change 29
29
Dockerfile : [Dockerfile]
30
30
suffix : [""]
31
31
latest : ["auto"]
32
- include : []
32
+ include :
33
+ - Dockerfile : Dockerfile.azcli
34
+ suffix : -azcli
35
+ latest : false
33
36
runs-on : ubuntu-latest
34
37
steps :
35
38
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change
1
+ #############################################
2
+ # Build
3
+ #############################################
4
+ FROM --platform=$BUILDPLATFORM golang:1.19-alpine as build
5
+
6
+ RUN apk upgrade --no-cache --force
7
+ RUN apk add --update build-base make git
8
+
9
+ WORKDIR /go/src/github.com/webdevops/azure-auditor
10
+
11
+ # Dependencies
12
+ COPY go.mod go.sum .
13
+ RUN go mod download
14
+
15
+ # Compile
16
+ COPY . .
17
+ RUN make test
18
+ ARG TARGETOS TARGETARCH
19
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build
20
+
21
+ #############################################
22
+ # Test
23
+ #############################################
24
+ FROM gcr.io/distroless/static as test
25
+ USER 0:0
26
+ WORKDIR /app
27
+ COPY --from=build /go/src/github.com/webdevops/azure-auditor/azure-auditor .
28
+ COPY --from=build /go/src/github.com/webdevops/azure-auditor/templates ./templates
29
+ RUN ["./azure-auditor", "--help"]
30
+
31
+ #############################################
32
+ # Final
33
+ #############################################
34
+ FROM mcr.microsoft.com/azure-cli
35
+ ENV LOG_JSON=1
36
+ WORKDIR /
37
+ COPY --from=test /app .
38
+ USER 1000:1000
39
+ ENTRYPOINT ["/azure-auditor"]
You can’t perform that action at this time.
0 commit comments