-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do not run containers as root and do not create root owned files #234
Comments
Yeahhh, I encountered this issue as well when trying to tear down the export directories created by tests for #226, which ran fine locally but then ran into errors on the GHA because indeed the Docker volumes were root-owned and so any files created there could not be deleted... I ended up working around this by ignoring errors from Turns out though that this is a longstanding issue with Docker-compose named volumes. There are some workarounds but none of them are trivial. |
Part of wider work on best practices on GAEs.
|
as per #239 this is an issue that although not solved by, can still be monitored by 'docker scout'. Am investigating this to see if it is a viable approach. |
I've created an SOP for using Docker on the FlowEHR-Operations-Manual repo and will link to SLAB once it's been through it's PR review |
Check for privileged running with: |
Currently have: guidance for GAE running, collect auditing data
|
@jeremyestein Moving this to in progress, could you add additional tickets for the ones you haven't done. Thank you |
Definition of Done / Acceptance Criteria
The criteria above will both be fixed if the container no longer runs as root. If for some reason you only implement a fix for the file permissions issue (eg. by chowning the files after creating them), this issue should be split so the running as root issue is not lost.
Testing
System test should check which user each container is running as after bringing them up. Note that running on a non-linux host will falsely cause such a test to pass, as the special docker linux kernel on these platforms doesn't map container root to host root in the first place.
Any test that checks the presence and contents of an output file should also check the file's ownership. For an example, see
check_radiology_parquet.py
where these tests exist but have been temporarily demoted to logging only.Documentation
Depends on implementation as to whether user will have to do anything different because of this (eg. set an environment var)
Dependencies
Some possible solutions would need a reconfiguration of the GAE via Atos, which could take some time.
Details and Comments
Rationale
Possible implementations
userns_mode
) - also requires admin?user
property of the docker compose service spec.Someone may have to play around with a Docker install on Linux to see what works so we know what (if anything) we want to ask Atos for.
The text was updated successfully, but these errors were encountered: