Docker小记
来源:互联网 发布:超少年密码之人工智能 编辑:程序博客网 时间:2024/04/28 18:44
Docker小记
由于ubuntu16.04还不支持paddle paddle,所以就用了下docker。官网上安装都很详细了,这里记录一些比较蛋疼的方法。如果你想要在运行的docker容器里面访问ubuntu本地的文件咋办?你发现运行一个容器进入了一个新linux环境,无法看到你的ubuntu主机文件了,更不用说访问和运行了。此时就需要知道docker和宿主机之间的数据共享了!
docker share data between a docker container and host system using volumes
mkdir data1echo "docker data share with host system" >> data1/filedocker run -v $PWD/data1:/opt/data1 -it paddledev/paddle:cpu-latest /bin/bashcat /opt/data1/fileError 1:FATA[0000] Error response from daemon: cannot bind mount volume: data1 volume paths must be absolute.You need to supply a full path to both source and destination directories. Hint: the full path always starts with /. Error 2:# ls /opt/data1/ ls: cannot open directory /opt/data1/: Permission deniedThis error is caused by SElinux running on your local host system. The following two solutions will help to solve this issue. First, solution is to disable SElinux on your local host system.# setenforce 0Since disabling the SElinux may hinder an integrity of your host system it may be easier to give an extended privileges to your container instead, with a docker --privileged=true option:# docker run --privileged=true -v $PWD/data1:/opt/data1 -it paddledev/paddle:cpu-latest /bin/bash
0 0
- Docker小记
- Docker 小记
- Docker小记
- Docker实战小记
- Docker 常用命令小记
- Docker命令小记。
- docker 小记(一)
- 小记
- 小记
- 小记
- 小记
- 小记
- 小记
- 小记
- 小记.
- 小记
- 小记 、
- 小记
- 修改状态栏字体颜色
- LoadRunner录制时IE8崩溃的解决办法
- 从拉普拉斯矩阵说到谱聚类
- Android Studio系列教程--基本设置与运行
- QT 钟表的实现
- Docker小记
- Linux中线程与CPU核的绑定
- 02jquery01-02解决之前js的问题
- Getting Started
- 尺度空间理论
- Activity切换动画的实现(右上角由小变大)
- 图片命名规范
- 字符操作编程题(不断更新)
- eclipse列编辑