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

Fix some serving samples' Dockerfile to run as non-root user #1

Closed
wants to merge 3 commits into from

Conversation

prushh
Copy link
Owner

@prushh prushh commented Nov 16, 2023

Some fixes related to knative/serving#14566

Proposed Changes

Defined a new user in the Dockerfile of the following serving sample projects to run the containers as a non-root user:

  • cloudevents
    • cloudevents-dotnet
    • cloudevents-go
    • cloudevents-nodejs
    • cloudevents-rust
    • cloudevents-spring
    • cloudevents-vertx
  • gitwebhook-go
  • grpc-ping-go
  • hello-world
    • helloworld-csharp
    • helloworld-go
    • helloworld-java-spark
    • helloworld-java-spring
    • helloworld-kotlin
    • helloworld-nodejs
    • helloworld-php
    • helloworld-python
    • helloworld-ruby
    • helloworld-scala
    • helloworld-shell
  • knative-routing-go
  • kong-routing-go
  • multi-container
    • servingcontainer
    • sidecarcontainer
  • secrets-go

All items marked in the task list have been built and tested using only Docker (no Knative Service) and they work as expected.

I updated the README.md file of each project when necessary (ex. the Dockerfile if specified, markdown warnings, etc.).

In all Dockerfiles using the gcr.io/distroless repository for the last stage image, I didn't know which set of commands to use (useradd/groupadd vs adduser/addgroup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant