Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
466 views
in Technique[技术] by (71.8m points)

docker - Cannot mount local directory in container though path exists

I am having a frustrating issue I am running

docker run --name=thl001  -p 1001:8888 thl-runtime -v /Users/test/Desktop/thl-docker/dockerruntime:/opt/thl

and I confirm that both paths exists but when I run it I get

[FATAL tini (7)] exec -v failed: No such file or directory

Any help is appreciated

question from:https://stackoverflow.com/questions/65943117/cannot-mount-local-directory-in-container-though-path-exists

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Docker arguments need to go before the image name. Arguments that follow the image name are container arguments rather than Docker arguments.

docker run --name=thl001  -p 1001:8888 -v /Users/test/Desktop/thl-docker/dockerruntime:/opt/thl thl-runtime 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...