Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for shoot comparison test app #306

Merged
merged 7 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
```
Loading