针对你遇到的问题“docker not a directory: unknown: are you trying to mount a directory onto a”,这是一个常见的Docker挂载错误。以下是对这个问题的详细分析和解决方案: 确认用户意图 你似乎在尝试在Docker中挂载一个目录或文件,但遇到了错误。 检查Docker命令 在Docker中,挂载操作通常使用-v或--mount参数来...
caused: not a directory: unknown: 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 出现这个问题是在编写yml文件的文件夹映射时,不应该写到具体文件,应该映射到目录。
通过上面可以看到,容器中,或者说原有的镜像中已经存在了/mydir,而且/mydir是一个文件夹。 而现在把test.txt这个文件映射挂载为文件夹,即会报could not synchronise with container process: not a directory的错误。 修正方法只要修改一下挂载点就可以,可以使用-v $PWD/test.txt:/mydir/test.txt即可成功启动。
volumes: - ./docker/app/vhost.conf:/etc/apache2/sites-enabled/000-default.conf # error: Cannot create container for service app: not a directory - ./docker/app/vhost.cnf:/etc/apache2/sites-enabled/000-default.conf # works - ./docker/app/vhost_conf:/etc/apache2/sites-enabled/000-defau...
sincorchetes/php-fpm.conf" to rootfs at "/opt/bitnami/php/etc/php-fpm.conf": mount /Users/sincorchetes/php-fpm.conf:/opt/bitnami/php/etc/php-fpm.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file...
Update docker readme to prevent cut-n-paste error… 30be3e1 tompscanlanadded a commit to tompscanlan/mosquitto that referenced this issueNov 16, 2017 Update docker readme to prevent cut-n-paste error… b4e3c2b ralightclosed this ascompletedNov 7, 2018 ...
caused \\\“not a directory\\\”\""\n". frankisans(Frankisans)November 30, 2016, 11:35am6 I had similar error and add :ro to specify read-only access on the volume definition: ./default.conf:/etc/nginx/conf.d/default.conf:ro ...
通过遵循上述步骤,您应该能够解决"unable to prepare context: context must be a directory: Dockerfile_hot"错误。确保正确设置上下文目录结构,并在构建 Docker 镜像时指定正确的上下文路径。这将使得 Docker 能够正确地找到所需的文件和目录,并成功构建镜像。
(not supported with cgroups v2) --cpu-rt-runtime int Limit the CPU real-time runtime in microseconds for the parent cgroup for all containers (not supported with cgroups v2) --cri-containerd start containerd with cri --data-root string Root directory of persistent Docker state (default "/...
然后通过docker build构建镜像时抛出如下错误: tar: /hadoop-3.1.2.tar.gz: Cannot read: Is a directory tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now 原因是ADD命令会自动把压缩文件进行解压缩,无需自己解压缩,所以会提示“文件已存在”。如果想要自己进行解压缩,需...