jikkou
jikkou copied to clipboard
Dockerfile should not define USER
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
- Launch the container
- 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 ...
).
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/*
Yes, but that requires maintaining/hosting our own image. Using the official image directly is less overhead and the preferred solution.