the FROM docker. IO/majiajue jdk1.8
MAINTAINER [email protected]
The ADD user - 0.0.1 - the SNAPSHOT. Jar/opt/user. The jar
VOLUME/opt
ENTRYPOINT [" Java ", "- the jar", "/opt/user. The jar"]
Want to put the container to mount the/opt directory to a host of/data/user directory, execute
docker run - p 9091:9091 - v/data/user:/opt user: 1.9Error: Error: Unable to access jarfile user. Jar
For bosses to help the younger brother to see what problem, thank you
CodePudding user response:
Docker mount host need docker directory is empty, the docker opt have content, cannot mount, and/opt is multi-user Shared directory, not suitable for such sharing