ros-tooling / setup-ros-docker

2 stars 5 forks source link

Run as root user #24

Closed emersonknapp closed 3 years ago

emersonknapp commented 3 years ago

Fixes #7

According to the github action documentation, we should actually run all actions in containers as the root user - this is the recommended workflow. We originally chose non-root because its standard practice in other docker-based workflows, such as web applications.

From https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners

Note: GitHub Actions must be run by the default Docker user (root). Ensure your Dockerfile does not set the USER instruction, otherwise you will not be able to access GITHUB_WORKSPACE

The above applies to also GITHUB_ENV and GITHUB_PATH, which are separate paths used by the core.addPath and core.setEnv commands from @actions/core. As of https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ - anyone using these containers and those commands have permissions-based failures