yuqiwei
yuqiwei

Reputation: 51

How to execute Docker container as root

when I connect to the graph-tool container in Docker, I can only enter it as user other than root. And if I use docker exec -it --user root graph-tool bash, it always show the following information: OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused "chdir to cwd (\"/home/user\") set in config.json failed: permission denied": unknown

could anybody tell me how to address it?

Upvotes: 3

Views: 1032

Answers (1)

yuqiwei
yuqiwei

Reputation: 51

Well, I found that I followed the docker official instruction to run the graph-tool in jupyter notebook where there is a code docker run -p 8888:8888 -p 6006:6006 -it -u user -w /home/user tiagopeixoto/graph-tool bash. So I just modify -u user to -u root. And it successfully corrects.

Upvotes: 2

Related Questions