【发布时间】:2019-01-15 16:39:24
【问题描述】:
这是我的码头工人:
» which docker
/snap/bin/docker
» docker --version
Docker version 17.06.2-ce, build a04f55b
我安装的是:
sudo snap install docker
我尝试构建图像:
» docker build -f ./Dockerfile .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/snapd/void/Dockerfile: no such file or directory
Dockerfile 在那里:
» ls -l Dockerfile
-rw-rw-r-- 1 damane damane 144 Aug 8 13:48 Dockerfile
这是我的系统:
» lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19 Tara
Release: 19
Codename: tara
【问题讨论】:
-
试试
docker build .不设置Dockerfile路径 -
@juanlumn 已经尝试过了(那是我的初始命令,并移至显式版本,认为我可以解决该错误)
-
你能分享一下 Dockerfile 吗?另外 Dockerfile 叫 Dockerfile 而不是 Dockerfile.txt 之类的,对吧?
-
@juanlumn 是的,没有扩展名。我找到了一种解决方法:使用
sudo apt install docker.io而不是sudo snap install docker安装docker。似乎快照包没有很好地策划? -
@juanlumn 是的,确实如此
标签: linux docker linux-mint