Skip to content

Commit

Permalink
Merge pull request #306 from akgalwas/shoot-compare-build
Browse files Browse the repository at this point in the history
Dockerfile for shoot comparison test app
  • Loading branch information
kyma-bot authored Jul 30, 2024
2 parents 5821cb2 + 08dd855 commit 25627e7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.22.5 as builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
WORKDIR /project_workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /project_workspace/manager .
COPY converter_config.json .
USER 65532:65532

Expand Down
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-alpine 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 25627e7

Please sign in to comment.