Tag: docker

运行Docker镜像作为容器

我从dockerfilebuild立了一个docker镜像。 我看到这个图像已经成功build立了,但我该怎么处理呢? 它不应该能够作为一个容器运行吗? 对于docker工人来说,这可能是我的错误理解,任何帮助都会很棒。

我如何删除Docker的图像?

我有以下图片: alex@alexvps:~$ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE <none> <none> 70c0e19168cf 5 days ago 1.069 GB <none> <none> c2ce80b62174 8 days ago 399.2 MB <none> <none> 60afe4036d97 8 days ago 325.1 MB 当我尝试删除其中一个我得到: alex@alexvps:~$ sudo docker rmi 60afe4036d97 Error: Conflict, 60afe4036d97 wasn't deleted 2014/01/28 00:54:00 Error: failed to remove one or […]

如何使用Docker公开多个端口?

所以我有3个端口应该暴露在机器的界面。 是否有可能使用Docker容器做到这一点?

networking超时尝试连接到https://index.docker.io

我刚刚在他们的网页上安装了Docker-Toolbox 我从Docker QuickStart Terminal开始,看看如下 ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_______/ docker is configured to use the default machine with IP 192.168.99.100 For help getting started, check out the docs at […]

如何在Docker容器中装载主机目录?

我正在尝试将一个主机目录挂载到docker容器中,以便在主机上完成的所有更新都反映到docker容器中。 在Google和Google阅读docker链接之后,我无法成功。 有人可以指出我在哪里做错了吗? 这是我做的 kishore$ cat Dockerfile FROM ubuntu:trusty RUN apt-get update RUN apt-get -y install git curl vim CMD ["/bin/bash"] WORKDIR /test_container VOLUME ["/test_container"] kishore$ tree . ├── Dockerfile └── main_folder ├── tfile1.txt ├── tfile2.txt ├── tfile3.txt └── tfile4.txt kishore$ tree . ├── Dockerfile └── main_folder ├── tfile1.txt ├── tfile2.txt ├── tfile3.txt └── tfile4.txt […]

Docker命令无法连接到Docker守护进程

我想转移到Docker,所以我刚刚开始乱它。 我已经在VirtualBox Ubuntu 15.10(Wily Werewolf)安装上安装了Docker,并在这里build议我尝试运行一个基本的nginx Docker镜像: $ docker run –name mynginx1 -P -d nginx Cannot connect to the Docker daemon. Is the docker daemon running on this host? 所以我检查了Docker是否在运行: $ sudo service docker status ● docker.service – Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since vr 2015-11-06 08:41:48 […]

容器退出时我丢失了我的数据

尽pipeDocker的交互式教程和常见问题,当容器退出时,我失去了我的数据。 我已经安装了这里描述的Docker: http : //docs.docker.io/en/latest/installation/ubuntulinux没有任何问题在Ubuntu 13.04。 但退出时会丢失所有数据。 iman@test:~$ sudo docker version Client version: 0.6.4 Go version (client): go1.1.2 Git commit (client): 2f74b1c Server version: 0.6.4 Git commit (server): 2f74b1c Go version (server): go1.1.2 Last stable version: 0.6.4 iman@test:~$ sudo docker run ubuntu ping 2013/10/25 08:05:47 Unable to locate ping iman@test:~$ sudo docker run ubuntu apt-get […]

pipe理docker共享卷权限的(最佳)方法是什么?

我一直在玩泊坞坞一段时间,并在处理持久性数据时不断发现同样的问题。 我创build了我的Dockerfile并公开了一个卷,或者使用–volumes-from来在我的容器中安装一个主机文件夹 我的问题是,我应该对主机上的共享卷应用什么权限? 我可以想到2个选项: 到目前为止,我一直在做的,给每个人读/写访问,所以我可以从docker容器写入文件夹 将主机中的用户映射到容器中,以便我可以分配更细化的权限。 不知道这是可能的,但没有发现太多。 到目前为止,我所能做的就是以某个用户的身份运行容器: docker run -i -t -user="myuser" postgres ,但是这个用户与我的主机myuser有不同的UID,所以权限不起作用。 另外,我不确定映射用户是否会带来一些安全风险。 任何其他的select? 你们怎么处理这个问题?

是否有可能在正在运行的容器中启动一个shell会话(不使用ssh)

我天真地期待这个命令在运行的容器中运行一个bash shell: docker run "id of running container" /bin/bash 它看起来不可能,我得到的错误: 2013/07/27 20:00:24 Internal server error: 404 trying to fetch remote history for 27d757283842 所以,如果我想在运行容器中运行bash shell(例如,用于诊断目的) 我必须在其中运行SSH服务器并通过SSHlogin?

探索Docker容器的文件系统

我已经注意到docker工人,我需要了解容器内发生了什么,或者有什么文件存在。 一个例子是从docker索引下载图像 – 你不知道图像包含什么,所以不可能启动应用程序。 什么是理想的是能够ssh入他们或同等学历。 有没有一个工具来做到这一点,或者是我认为我应该能够做到这一点的docker错误的概念。