diff --git a/entrypoint.sh b/entrypoint.sh index 5ae71087..9a6f9350 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -170,7 +170,9 @@ fi # Start docker service if needed (e.g. for docker-in-docker) if [[ ${_START_DOCKER_SERVICE} == "true" ]]; then echo "Starting docker service" - service docker start + _PREFIX="" + [[ ${_RUN_AS_ROOT} != "true" ]] && _PREFIX="sudo" + ${_PREFIX} service docker start fi # Container's command (CMD) execution as runner user