0
にファイルをマウントすることができませんでした、彼らは 、助けてください、存在している私はコンテナにローカルconfigurateionをマウントしたいドッキングウィンドウの実行私はローカルファイルをチェックして、コンテナ
sudo docker run -v /usr1/V3R002C10_BP/.m2/settings.xml:/usr/share/apache-maven-3.3.9/conf/settings.xml:rw -v /usr1/V3R002C10_BP/.sbt/repositories:/root/.sbt/repositories:rw -v /usr1/V3R002C10_BP:/usr1/V3R002C10_BP:rw --workdir=/usr1/V3R002C10_BP/task1935/ac_bp_all --net host --name ubuntu_bash5 -i -t hub.witcloud.huawei.com/r00230944/suse11sp3:1.0.2 /bin/bash
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/usr1/V3R002C10_BP/.sbt/repositories\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/34872c92bc91fe920b846d5abff3d43ec0042fe8a1df8a1d20d03b6f24c7ff51\\\" at \\\"/var/lib/docker/aufs/mnt/34872c92bc91fe920b846d5abff3d43ec0042fe8a1df8a1d20d03b6f24c7ff51/root/.sbt/repositories\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
次は、ファイルをマウントするためのチェックです:
[email protected]:/opt# ll /usr1/V3R002C10_BP/.m2/settings.xml
total 12
drwxrwxrwx 2 root root 4096 Jul 20 17:37 ./
drwxrwxrwx 3 root root 4096 Jul 20 16:33 ../
-rwxrwxrwx 1 root root 2226 Jul 20 17:37 settings.xml.sdn*
[email protected]:/opt# ll /usr1/V3R002C10_BP/.sbt/repositories
total 12
drwxrwxrwx 2 root root 4096 Jul 20 17:37 ./
drwxrwxrwx 3 root root 4096 Jul 20 16:33 ../
-rwxrwxrwx 1 root root 456 Jul 20 17:37 repositories*
[email protected]:/opt# ll /usr1/V3R002C10_BP
total 28
drwxr-xr-x 7 root root 4096 Jul 20 18:07 ./
drwxr-xr-x 6 root root 4096 Jul 21 04:56 ../
drwxr-xr-x 23 root root 4096 Jul 20 18:28 ac_bp_all/
drwxr-xr-x 2 root root 4096 Jul 20 17:37 gradle/
drwxrwxrwx 3 root root 4096 Jul 20 16:33 .m2/
drwxrwxrwx 3 root root 4096 Jul 20 16:33 .sbt/
drwxr-xr-x 2 root root 4096 Jul 20 18:23 task1935/
ありがとう、私はお試しください – Jason
この回答がうまくいく場合は、回答としてマークしてください –