Skip to content

Commit 0ee6deb

Browse files
committed
improve docker build
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 4d566c5 commit 0ee6deb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build
2222
# Test
2323
#############################################
2424
FROM gcr.io/distroless/static as test
25-
ENV LOG_JSON=1
26-
COPY --from=build /go/src/github.com/webdevops/azure-auditor/azure-auditor /
27-
COPY --from=build /go/src/github.com/webdevops/azure-auditor/templates/ /templates/
28-
RUN ["/azure-auditor", "--help"]
25+
WORKDIR /app
26+
COPY --from=build /go/src/github.com/webdevops/azure-auditor/azure-auditor .
27+
COPY --from=build /go/src/github.com/webdevops/azure-auditor/templates ./templates
28+
RUN ["./azure-auditor", "--help"]
2929

3030
#############################################
3131
# Final
3232
#############################################
3333
FROM gcr.io/distroless/static
3434
ENV LOG_JSON=1
35-
COPY --from=test /azure-auditor /
36-
COPY --from=test /templates/ /templates/
35+
WORKDIR /
36+
COPY --from=test /app .
3737
USER 1000:1000
3838
ENTRYPOINT ["/azure-auditor"]

0 commit comments

Comments
 (0)