Skip to content

Add docker container #1

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

Closed
Closed
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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given it's a Go app, let's use golang to build and the scratch base to run the app (multi-stage build).


WORKDIR /app

COPY . /app

RUN go build -o kube-rbac-extractor

ENTRYPOINT [ "./kube-rbac-extractor" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A newline at the end of the file is needed.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ rules:
- watch
```

## Using the Docker image

You can build and run the docker image as follows:

```shell
docker build . -t kube-rbac-extractor

helm template dev oci://registry-1.docker.io/bitnamicharts/postgresql |
docker run --rm kube-rbac-extractor --access read --namespace dev --name developer-access
```

## License

Merger is an open-source software licensed under the MIT license. For more details, check the [LICENSE](LICENSE) file.