diff --git a/configs/devkit/linux/agent/Ubuntu.devkit.Dockerfile b/configs/devkit/linux/agent/Ubuntu.devkit.Dockerfile index 7f94b4c2c..3bb24a950 100644 --- a/configs/devkit/linux/agent/Ubuntu.devkit.Dockerfile +++ b/configs/devkit/linux/agent/Ubuntu.devkit.Dockerfile @@ -11,16 +11,16 @@ FROM ${teamCityImage} USER root # Remove agent code sequentially to work around the inability to delete volumes from the base image. -RUN rm -rf '/opt/buildagent/bin/*' && \ - rm -rf '/opt/buildagent/tools/*' && \ - rm -rf '/opt/buildagent/system/*' && \ - rm -rf '/opt/buildagent/plugins/*' && \ - rm -rf '/opt/buildagent/temp/*' && \ - rm -rf '/opt/buildagent/work/*' && \ - rm -rf '/opt/buildagent/lib/*' && \ - rm -rf '/opt/buildagent/conf/*' && \ - rm -rf '/opt/buildagent/launcher/*' && \ - rm -rf '/data/teamcity_agent/conf/*' +RUN rm -rf /opt/buildagent/bin/* && \ + rm -rf /opt/buildagent/tools/* && \ + rm -rf /opt/buildagent/system/* && \ + rm -rf /opt/buildagent/plugins/* && \ + rm -rf /opt/buildagent/temp/* && \ + rm -rf /opt/buildagent/work/* && \ + rm -rf /opt/buildagent/lib/* && \ + rm -rf /opt/buildagent/conf/* && \ + rm -rf /opt/buildagent/launcher/* && \ + rm -rf /data/teamcity_agent/conf/* USER buildagent diff --git a/configs/devkit/linux/server/ubuntu/Ubuntu.devkit.Dockerfile b/configs/devkit/linux/server/ubuntu/Ubuntu.devkit.Dockerfile index 56145f8ce..a8beaa5f8 100644 --- a/configs/devkit/linux/server/ubuntu/Ubuntu.devkit.Dockerfile +++ b/configs/devkit/linux/server/ubuntu/Ubuntu.devkit.Dockerfile @@ -10,7 +10,15 @@ FROM ${teamCityImage} USER root -RUN rm -rf /opt/teamcity +RUN rm -rf /opt/teamcity/temp/* && \ + rm -rf /opt/teamcity/logs/* && \ + rm -rf /opt/teamcity/conf/* && \ + rm -rf /opt/teamcity/lib/* && \ + rm -rf /opt/teamcity/bin/* && \ + rm -rf /opt/teamcity/devPackage/* && \ + rm -rf /opt/teamcity/webapps/* && \ + rm -rf /opt/teamcity/licenses/* + USER tcuser:tcuser CMD ["sleep", "infinity"]