-
Notifications
You must be signed in to change notification settings - Fork 747
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
[SYCL][Devops] Fix DockerFile linting issues discovered by trivy
#16411
Conversation
See https://avd.aquasec.com/misconfig/ds017 Docker best practices says that running `update` and `install` commands separately may lead to situations where Docker skips `update` step and re-uses cache leading to outdated versions of packages being installed.
See https://avd.aquasec.com/misconfig/ds002 Made it so that the last `USER` command in `base` and `build` is not `root`.
See https://avd.aquasec.com/misconfig/ds002 Made it so our docker files have at least one `USER` command which is not `root`.
Note for reviewers: whilst I'm troubleshooting issues with container builds, I'm cancelling all other affected workflows. Once this patch is ready for review and I receive some feedback, I will do a full CI run with all checks to make sure that my workflow changes don't cause any issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, all feedback addressed from previous pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, just noticed some typos in the doc
@bader @steffenlarsen Doc overlords, can someone take a look? Thanks! Need to make some Docker changes soon, so having this PR in will make merge simpler. |
Apparently, I overlooked part of the documentation saying that docker secrets are only available for containers running as a service which isn't the case for our build/test CI pipeline. Therefore, I'm partially reverting #16411 so that our containers once again use `sycl` user which has password-less `sudo` access. This PR also reverts #16436 to re-enable GPU reset.
Apparently, I overlooked part of the documentation saying that docker secrets are only available for containers running as a service which isn't the case for our build/test CI pipeline. Therefore, I'm partially reverting #16411 so that our containers once again use `sycl` user which has password-less `sudo` access. This PR also reverts #16436 to re-enable GPU reset.
Apparently, I overlooked part of the documentation saying that docker secrets are only available for containers running as a service which isn't the case for our build/test CI pipeline. Therefore, I'm partially reverting #16411 so that our containers once again use `sycl` user which has password-less `sudo` access. This PR also reverts #16436 to re-enable GPU reset.
This is a re-submit of #16290 with fixes from #16324 and some more extra changes.
Issues addressed:
See https://avd.aquasec.com/misconfig/ds017
See https://avd.aquasec.com/misconfig/ds002
Issues remaining:
See https://avd.aquasec.com/misconfig/ds026
I didn't add
HEALTHCHECK
command to our containers, because I don't know if that makes sense and which command to launch. I.e. our containers they only provide some pre-installed tools, but they don't launch any services which we could check.User creation was outlined into a separate helper script. Our containers only come with
sycl_ci
user now which requires a password to usesudo
. However, it is still possible to get the originalsycl
user for those who uses that container locally and needssudo
access.