我有一個docker,版本號爲17.06.0-ce
。當我試圖安裝使用泊塢窗用命令nginx的:docker nginx:你是否試圖將一個目錄掛載到文件上
docker run -p 80:80 -p 8080:8080 --name nginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf -v $PWD/logs:/wwwlogs -d nginx:latest
它表明
docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:57: mounting \\\"/appdata/nginx/conf/nginx.conf\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/dcea22444e9ffda114593b18fc8b574adfada06947385aedc2ac09f199188fa0\\\" at \\\"/var/lib/docker/aufs/mnt/dcea22444e9ffda114593b18fc8b574adfada06947385aedc2ac09f199188fa0/etc/nginx/nginx.conf\\\" 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.
如果不安裝nginx.conf
文件,一切都還好。那麼,我怎樣才能掛載配置文件呢?
謝謝。
'ls -al .'的輸出是什麼?想看看你的密碼看起來像什麼。 –