1. Home
  2. Docs
  3. docker
  4. FAQ
  5. 构建mysql报告错误no such file or directory

构建mysql报告错误no such file or directory

错误信息

jw@ok mysql45$ sudo docker-compose up -d mysql57
WARNING: Some networks were defined but are not used by any service: frontend
Creating volume "mysql45_mysql" with local driver
Building mysql57
[+] Building 0.1s (1/2)
 => [internal] load build definition from Dockerfile                                                                    0.0s
 => => transferring dockerfile: 2B                                                                                      0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount226963642/Dockerfile: no such file or directory
ERROR: Service 'mysql57' failed to build : Build failed

解决

原因: Dockerfile文件命名不规范

方法1:正确写Dockerfile
方法2:手动指定构建文件的名字

相关资料

参考资料

Was this article helpful to you? Yes No

How can we help?