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 should not define USER #314

Closed
singhbaljit opened this issue Nov 4, 2023 · 3 comments
Closed

Dockerfile should not define USER #314

singhbaljit opened this issue Nov 4, 2023 · 3 comments
Labels
wontfix This will not be worked on

Comments

@singhbaljit
Copy link

singhbaljit commented Nov 4, 2023

Describe the bug
The official Jikkou images define a USER in the Dockerfile. While it is usually a good practice to run containers with non-root, this is not great in CI/CD pipelines. We're unable install additional packages due to non-root user.

To Reproduce

  1. Launch the container
  2. Install a new package, i.e. apk add ...

Expected behavior
Container should run as root by default so users can add additional packages in their CI pipelines

Runtime environment

  • Jikkou: 0.30.0

Additional context
Since our pipelines run on Kubernetes, we can't easily change the user at runtime (unlike docker run ...).

@fhussonnois
Copy link
Member

Hi @singhbaljit, you can still switch the USER to root when building new image from jikkou.

FROM streamthoughts/jikkou

USER root

RUN apk add --update curl && \
    rm -rf /var/cache/apk/*

@singhbaljit
Copy link
Author

singhbaljit commented Nov 4, 2023

Yes, but that requires maintaining/hosting our own image. Using the official image directly is less overhead and the preferred solution.

@fhussonnois fhussonnois added the wontfix This will not be worked on label Sep 29, 2024
@fhussonnois
Copy link
Member

For security purposes, it's a good practice to always run Docker images run as non-root. In addition, most of secured environements block containers running as root by default. For those reasons and to be secured by designed the Dockerfile will not be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants