Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
`sudo docker build.`从docker snap包失败_Docker_Snapcraft - Fatal编程技术网

`sudo docker build.`从docker snap包失败

`sudo docker build.`从docker snap包失败,docker,snapcraft,Docker,Snapcraft,我运行Ubuntu 16.04,并通过snap软件包安装了dockerdocker build无法访问我的Dockerfile,它设置在~的子目录中 快照界面似乎已正确连接 $ snap interfaces Slot Plug ... :home docker ... 但是,当我调用docker build(从包含Dockerfile的目录中)时,我得到以下错误 $ sudo docker build . -t serial-wiring.base unable to prepar

我运行Ubuntu 16.04,并通过snap软件包安装了docker
docker build
无法访问我的
Dockerfile
,它设置在
~
的子目录中

快照界面似乎已正确连接

$ snap interfaces
Slot    Plug
...
:home   docker
...
但是,当我调用
docker build
(从包含
Dockerfile
的目录中)时,我得到以下错误

$ sudo docker build . -t serial-wiring.base
unable to prepare context: unable to evaluate symlinks in context path: lstat /home/<username>/Documents: permission denied
注意:我已经确认了docker构建-t串行连接.base在Windows上使用此Dockerfile工作


由于不断发展的snappy模型中存在限制问题,Docker在默认情况下不是全味的()

获取一些关于如何绕过(即破坏)约束模型的有用说明,直到正确修复到位。您只需检查快照中打包的Docker help应用程序

$ docker.help
Docker snap: Docker Linux container runtime.

Due to the confinement issues on snappy, it requires some manual setup to make docker-snap works on your machine.
We'll take you through the steps needed to set up docker snap work for you on ubuntu core and ubuntu classic.

On Ubuntu classic, before installing the docker snap, 
please run the following command to add the login user into docker group.
    sudo addgroup --system docker
    sudo adduser $USER docker
    newgrp docker

On Ubuntu Core 16, after installing the docker snap from store,
Firstly, you need to connect the two interfaces as they're not auto-connected by default.
    sudo snap connect docker:account-control :account-control
    sudo snap connect docker:home :home

Secondly, reload the snap and allows the user to login to the new group "docker-snap".
    snap disable docker
    snap enable  docker
    newgrp docker-snap

Then have fun with docker in snappy.
最后一个命令失败

$ newgrp docker-snap
newgrp: group 'docker-snap' does not exist

然而,我没有注意到故障带来的任何负面影响,Docker现在的功能与我预期的一样。

由于不断发展的snappy模型中存在限制问题,Docker在默认情况下不是全味的()

获取一些关于如何绕过(即破坏)约束模型的有用说明,直到正确修复到位。您只需检查快照中打包的Docker help应用程序

$ docker.help
Docker snap: Docker Linux container runtime.

Due to the confinement issues on snappy, it requires some manual setup to make docker-snap works on your machine.
We'll take you through the steps needed to set up docker snap work for you on ubuntu core and ubuntu classic.

On Ubuntu classic, before installing the docker snap, 
please run the following command to add the login user into docker group.
    sudo addgroup --system docker
    sudo adduser $USER docker
    newgrp docker

On Ubuntu Core 16, after installing the docker snap from store,
Firstly, you need to connect the two interfaces as they're not auto-connected by default.
    sudo snap connect docker:account-control :account-control
    sudo snap connect docker:home :home

Secondly, reload the snap and allows the user to login to the new group "docker-snap".
    snap disable docker
    snap enable  docker
    newgrp docker-snap

Then have fun with docker in snappy.
最后一个命令失败

$ newgrp docker-snap
newgrp: group 'docker-snap' does not exist

但是,我没有注意到故障带来的任何负面影响,Docker现在可以正常工作了。

如果
Dockerfile
不在运行它的目录中(
Docker build.
),则需要提供它所在目录的路径。上下文出现在选项之后:
docker build-t serial wiring base。
@meatspace他们在最新版本中对参数解析做了一些改进,我认为这是一个得到修复的命令(re:Context after options)来澄清,
Dockerfile
在我调用的目录中。我将更新问题…如果
Dockerfile
不在您运行它的目录中(
docker build.
),您需要提供它所在目录的路径。上下文出现在选项之后:
docker build-t serial wiring base。
@meatspace他们在最新版本中对参数解析做了一些改进,我认为这是一个得到修复的命令(re:Context after options)来澄清,
Dockerfile
在我调用的目录中。我会更新这个问题。。。