ROX-10097: Do dnf upgrade in docs container to aid with rpm vulns#1590
ROX-10097: Do dnf upgrade in docs container to aid with rpm vulns#1590
dnf upgrade in docs container to aid with rpm vulns#1590Conversation
|
The previous build has failed because default nginx user is non-root. See https://app.circleci.com/pipelines/github/stackrox/stackrox/11261/workflows/3ee11cc6-ee49-4f4e-9d02-aa16acc71696/jobs/520583 Therefore I made the container flip to root to do rpm stuff. |
|
Tag for build #526749 is 💻 For deploying this image using the dev scripts, run the following first: export MAIN_IMAGE_TAG='3.70.x-15-g8b6866f6e7'🕹️ A |
docs/Dockerfile
Outdated
| # Switch back to the normal user of nginx container and check that we really switch to the original one. | ||
| USER 1001:0 | ||
| RUN echo "If the following command fails, update USER statement to match UID:GID of the user of nginx base container." && \ | ||
| [ "$(id -u):$(id -g)" = "$(cat /tmp/container-uid)" ] && \ |
There was a problem hiding this comment.
maybe a single = works in sh but it looks wrong to me.
| [ "$(id -u):$(id -g)" = "$(cat /tmp/container-uid)" ] && \ | |
| [ "$(id -u):$(id -g)" == "$(cat /tmp/container-uid)" ] && \ |
There was a problem hiding this comment.
The thing is: I used test ([) external command but not bash built-in [[. I believe, test-s equality check is only =. From man test:
STRING1 = STRING2
the strings are equal
I checked that [[ works in that command too, so using now that.
Description
This follows up on #1576
Note that I don't know if this fully addresses ROX-10097 because one needs to see nightly run results. This change should make things better but then I'd leave it to nightly tests to tell us vuln results.
Checklist
[ ] Unit test and regression tests added- not for this change.[ ] Evaluated and added CHANGELOG entry if required- not needed.[ ] Determined and documented upgrade steps- not needed.[ ] Documented user facing changes (create PR based on stackrox/openshift-docs and merge into rhacs-docs)- none.Testing Performed
docker run --rm -it -p 8080:8080 quay.io/rhacs-eng/docs:b53e0b9e-42186efb-b6d8cf96