Running docker as sudo is not the best security. https://engineering.bitnami.com/articles/why-non-root-containers-are-important-for-security.html Instead of running container as root add user to docker group and there will no need for using sudo.