We have a docker file that is set in Jenkins Pipeline and bitbucket which goes from Dev thru Prod and same Docker file is being used for all the environments. Our environment is in Openshift.
Each environment has it’s own user id and we were able to accomplish that with Openshift global environment variables (scc - anyuid) and each pod has it’s own envronment specific user as owner.
But we also have a command inside the Dockerfile which changes permissions for specific directories (chown -R dev_id /app). For this command i am looking to see if we can use different ID’s for each environment. In my current scenario, dev_id is used inside the Dockerfile and that is called across all the environments.
Please suggest if there are any options to accomplish this scenario.