Docker Permissiosn Issue non-root users

https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue

July 5, 2022 · word · Peter Dieleman

Runtime environment variables in React + nginx

Injecting Variables Through (b)ash https://github.com/facebook/create-react-app/issues/2353 https://www.freecodecamp.org/news/how-to-implement-runtime-environment-variables-with-create-react-app-docker-and-nginx-7f9d42a91d70/ https://medium.com/free-code-camp/how-to-implement-runtime-environment-variables-with-create-react-app-docker-and-nginx-7f9d42a91d70 https://www.bencode.net/posts/react-build/ <– check https://sinclert.github.io/react-env-vars/ https://gist.github.com/lezhkin11/d6b0a14127b4920feaece278e5323ee1 Using a Multi-stage Dockerfile Another option is to use a multi-stage Docker file, where the first stage is still using nodeJS, like this. This way node can still parse the environment variables as you would during local development, and the final deployed image is. However, in large organizations deploying such a multistage container in a production environment may irk some SecOps people....

May 6, 2022 · 82 words · Peter Dieleman

Openshift Documentation

Issues with root https://number1.co.za/openshift-will-not-run-your-container-as-a-root-user/ https://stackoverflow.com/questions/57044509/openshift-use-nginx-official-image-instead-of-one-from-oc-registry https://stackoverflow.com/questions/38754592/what-is-the-correct-way-to-run-an-nginx-docker-container-in-openshift https://engineering.bitnami.com/articles/running-non-root-containers-on-openshift.html https://torstenwalter.de/openshift/nginx/2017/08/04/nginx-on-openshift.html https://developers.redhat.com/blog/2020/10/26/adapting-docker-and-kubernetes-containers-to-run-on-red-hat-openshift-container-platform https://developers.redhat.com/blog/2020/10/26/adapting-docker-and-kubernetes-containers-to-run-on-red-hat-openshift-container-platform#how_to_debug_issues https://stackoverflow.com/questions/42363105/permission-denied-mkdir-in-container-on-openshift Although OpenShift runs containers using an arbitrarily assigned user ID, the group ID must always be set to the root group (0). Therefore, the directories and files that the processes running in the image need to access should have their group ownership set to the root group. They also need to be read/writable by that group as recommended by the OpenShift Container Platform-specific guidelines....

February 22, 2022 · 82 words · Peter Dieleman