Open henrikstromberg opened 4 years ago
Since all bitbucket-pipeline containers runs as root user it might be a good option to be able to set ES to run as root user. This can be a really handy option.
Sorry for piggy backing here, but is there any known workaround or recommended method for this? I am also trying to run integration tests from within a docker container and I'm getting blocked by this issue.
I hit the same issue in gitlab and was able to come around it. The problem was made worse by the fact that the gitlab-runner checks out the code as root
so dotnet test
crashed on source code file permission issues long before elasticsearch was started.
The following works for me (tm)
image:
name: mcr.microsoft.com/dotnet/sdk:5.0-buster-slim
script:
- adduser --disabled-password --gecos '' dotnetuser
- umask 0000
- chmod -R 777 $CI_PROJECT_DIR
- cp -r $CI_PROJECT_DIR /tmp
- chown -R dotnetuser /tmp
- su -l dotnetuser -c "dotnet test /tmp/MySolution.sln"
(@nickduch )
I need to run the elastic as root user in my docker container. I know that elastic recoment not to do that but is there a way to set it up ?