【问题标题】:Problems with building image using snap docker使用 snap docker 构建镜像的问题
【发布时间】: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


【解决方案1】:

这并不能直接回答您的 snap 安装问题,但我建议您不要使用 snap,而是按照 docker documentation page 上的说明进行操作。

这样您将始终拥有官方和更新版本

【讨论】:

  • 我可以确认,在删除 snap 并通过标准渠道安装后,这个问题就消失了。因此,这似乎确实直接回答了问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-09-16
  • 1970-01-01
  • 2020-10-06
  • 1970-01-01
  • 2018-06-19
相关资源
最近更新 更多