aztfmod / rover

The rover is a docker container in charge of the deployment of the Terraform platform engineering for Azure
MIT License
172 stars 142 forks source link

sudo in rover/scripts/tfstate.sh #232

Closed Ronaldschouw closed 2 years ago

Ronaldschouw commented 2 years ago

We have a problem with the sudo command when the container is used in Azure devops. The workaround is to remove sudo with a sed statement. The sudo command is executed but results in an error when the terraform plan is ready. The issue probably arises because we are running the container as root in azure devops. Can the sudo command be removed?

brk3 commented 2 years ago

Hi, it can (and should IMO) be removed. Submitted this in https://github.com/aztfmod/rover/pull/213 unsure if the equivalent has merged.

arnaudlh commented 2 years ago

thanks @brk3 and @Ronaldschouw - we are assessing the removal of the sudos and will update in next release!

LaurentLesle commented 2 years ago

There is one reason why sudo is still in the docker image. When using the rover with the devcontainer we are running a post command that set the permissions on the docker host pipe in order to execute docker commands from the rover.

sudo chmod 666 /var/run/docker.sock

LaurentLesle commented 2 years ago

Not going to remove the sudo in the near term. Closing the issue from now.