Docker container readonly

Is there any reason why the container is using a dedicated user?

this causes only the k6 directory to be writeable which is not documented and took us a long time to figure out :slight_smile:

Hi,

Is there any reason why the container is using a dedicated user?

yes, it’s following the best practice of running without root privileges by default. Besides this, it was done at the request of a user working with Kubernetes, which requires it for increased security. See issue #1314.

this causes only the k6 directory to be writeable which is not documented and took us a long time to figure out :slight_smile:

Yes, this was a slight breaking change we felt necessary for increased security. If you need the previous behavior you can always override USER in a custom image or at runtime, though I would suggest against using root if it’s not essential, and not writing inside the container itself, but mounting a writeable volume with whatever permissions you need.

1 Like