I am using TeamCity Enterprise 2018.1.3 (build 58658). On a RHEL7 agent with docker installed a step which should be run inside a container fails.I have checked the file which is created by teamcity for every build, if I make it executable then the step proceeds further. Similar step works well inside another Ubuntu 14 agent.
[15:31:20][Step 2/4] Starting: /bin/sh -c "docker run ... --entrypoint /bin/sh registry.access.redhat.com/rhel7.6 /home/teamcity/BuildAgent/temp/agentTmp/docker-shell-script-4456884981140035641.sh"
[15:31:20][Step 2/4] in directory: /home/teamcity/BuildAgent/work/f7492f11d0f86ca
[15:31:21][Step 2/4] /bin/sh: /home/teamcity/BuildAgent/temp/agentTmp/docker-shell-script-4456884981140035641.sh: Permission denied