I have built self-hosted ubuntu agents running in docker.
All works fine, build agent is working etc.
except everything in pipeline steps is being executed as root instead of non-root user.
E.g. When I try to execute "npm ci" and I look at my build-agent logs:
; node bin location = /usr/bin/node
; cwd = /azp/agent/_work/1/s/Core
; HOME = /root
vs logs from Microsoft hosted build-agent:
; node bin location = /usr/local/bin/node
; cwd = /home/vsts/work/1/s/Core
; HOME = /home/vsts
this gives me issues in lot of stages as running some commands as root requires different settings etc. Does anyone know how to change it from ROOT?
I tried within dockerfile and within start.sh script provided by microsoft but that did not worked. Build agent would not start at all if I would execute start.sh as docker user instead of root. Any clues? ideas?