发布于 2014-07-03 22:47:33 | 270 次阅读 | 评论: 0 | 来源: 网友投递
Docker 开源应用容器引擎
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。
Docker 很高兴的宣布 1.1.0 版本发布了,提升了整个 Docker 的生态系统,包括更新了 Docker 引擎、Docker Hub 和文档。
Docker 1.1.0 值得关注的改进有:
新的 .dockerignore 功能
你可以添加一个 .dockerignore
文件到你的 `Dockerfile` , Docker 将会在发送构建上下文到守护进程时忽略在 .dockerignore 中指定的文件和目录。
文件示例: https://github.com/dotcloud/docker/blob/master/.dockerignore
提交过程暂停容器
在一个运行中的容器中执行提交动作是不被推荐的,这会导致文件处于不一致的状态。现在你可以在提交过程中暂停容器的运行。
你可以禁用该特性 docker commit --pause=false <container_id>
.
Tailing logs
支持查看容器日志的最新内容,例如查看最新 10 行的日志: docker logs --tail 10 <container_id>
. 你也可以使用 -f 参数来监控日志最新内容 docker logs --tail 0 -f <container_id>
.
其实这个特性跟 Linux 下的 tail 是差不多的
允许 tar 文件作为 Docker 构建的上下文
你可以传递给 docker build 一个 tar 文件来作为上下文,用于自动化 docker build 过程,例如: cat context.tar | docker build -
or docker run builder_image | docker build -
在容器中绑定安装整个文件系统
/
现在允许作为 --volumes
的源。这意味着你可以在需要的时候绑定安装你的整个文件系统。例如 docker run -v /:/my_host ubuntu:ro ls /my_host
. 不过不允许安装到 /.
其他方面的改进和变化
Port allocation has been improved. In the previous release, Docker could prevent you from starting a container with previously allocated ports which seemed to be in use when in fact they were not. This has been fixed.
A bug in docker save
was introduced in the last release. The docker save
command could produce images with invalid metadata. The command now produces images with correct metadata.
Running docker inspect
in a container now returns which containers it is linked to.
The docker commit
flag has improved validation, to better prevent you from committing an image with a name such as -m
. Image names with dashes in them potentially conflict with command line flags.
The API now has Improved status codes for start
and stop
. Trying to start a running container will now return a 304 error.
Performance has been improved overall. Starting the daemon is faster than in previous releases. The daemon’s performance has also been improved when it is working with large numbers of images and containers.
Fixed an issue with white-spaces and multi-lines in Dockerfiles.
官方发行说明:http://blog.docker.com/2014/07/announcing-docker-1-1/
下载地址:https://github.com/dotcloud/docker/releases/tag/v1.1.0