Skip to content

Commit

Permalink
Dockerfile added
Browse files Browse the repository at this point in the history
  • Loading branch information
akgalwas committed Jul 23, 2024
1 parent 56bece6 commit 705db56
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions hack/shoot-comparator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.22.5-alpine3.19 AS build
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workdir

COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download

COPY cmd/ cmd/
COPY internal/ internal/
COPY pkg/ pkg/

ARG BIN
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o shoot-comparator cmd/main.go

FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=build /workdir/shoot-comparator .
USER 65532:65532

ENTRYPOINT ["/shoot-comparator"]
4 changes: 2 additions & 2 deletions hack/shoot-comparator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ For more details, please refer to the following issues:

## Build
```
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./bin/comparator ./cmd
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./bin/shoot-comparator ./cmd
```

## Run

To compare files, execute the following command:
```
comparator files <shoot file generated by Provisioner> <shoot file generated by KIM>
shoot-comparator files <shoot file generated by Provisioner> <shoot file generated by KIM>
```

0 comments on commit 705db56

Please sign in to comment.