Статьи

Докер объявляет о Docker 1,5

Если вы еще не слышали, команда Docker анонсировала Docker 1.5. В дополнение к поддержке IPv6, другие важные дополнения включают дополнительные функции Dockerfile и новую статистику API. Проверьте этот пресс-релиз из блога Докера для всех деталей:

Автор : По 

Команда проекта Docker хотела начать новый год прямо с чего-то удивительного; вот почему мы очень рады объявить о первом   выпуске Docker в 2015 году. Мы разбили много давних, надоедливых ошибок и объединили несколько удивительных функций, которыми восхищаются как  сообщество, так  и  сопровождающие  . Давайте посмотрим, что в Docker 1.5.

Поддержка IPv6

ПредоставленоMalte Janduda  —  Ссылка на PR

Теперь вы можете назначить адрес ipv6 каждому контейнеру с новым флагом ‘-ipv6’. Вы можете разрешить IPv6-адреса из контейнера. Вы даже можете использовать эту функцию для связи контейнеров между несколькими хостами. Для получения дополнительной информации о настройке ipv6 и о том, как она работает, ознакомьтесь с  документацией .

Вот забавный и простой способ опробовать эту новую функцию:


# run the nginx container

$ docker run -d -p 80:80 --restart always --name ipv6-nginx nginx

# exec into it to change the default config to support ipv6

$ docker exec -it ipv6-nginx bash

# edit the /etc/nginx/conf.d/default.conf

# under listen 80;

# add the following line:

# listen [::]:80

# restart the nginx service

# this will also pop you out of the container

# and back to your host

root@container # service nginx restart

# get the global ipv6 address

$ docker inspect --format="{{.NetworkSettings.GlobalIPv6Address}}" ipv6-nginx

2a00:1450::242:ac11:5e

$ curl -6 -g [2a00:1450::242:ac11:5e]

Контейнеры только для чтения

Предоставлено:  Майкл Кросби  —  Ссылка на PR

Теперь вы можете включить файловую систему только для чтения для вашего контейнера через --read-only флаг. Функция только для чтения позволяет вам ограничивать места, в которые приложение внутри контейнера может записывать файлы. Используя эту возможность в сочетании с томами, вы можете убедиться, что контейнеры сохраняют данные только там, где ими можно управлять в известном месте.

Статистика

Предоставлено:  Майкл Кросби  —  Ссылка на PR

Containers are cool. They allow you to package and run your applications in a portable way and let you set resource constraints on your applications to make sure that no one application can take over an entire machine. In order to choose accurate resource limits for your applications, profiling is required to collect this information.

In Docker 1.5, we introduce a new stats API endpoint and CLI command that will stream live CPU, memory, network IO and block IO for your containers. You can use the API endpoint to build tools that feed live resource information for your containers into your existing monitoring solutions, or build live dashboards directly using the API.

Снимок экрана 2015-02-10 в 12.02.42 PM

Specify the Dockerfile to use in build

Contributed by: Doug Davis – Link to PR

This is possibly one of the most requested feature in the past few months: the ability to specify the file to use in a docker build rather than relying on the default Dockerfile.  docker build -f allows you to define multiple Dockerfiles in a single project and specify which one to use at build time. This can be helpful if you require separate Dockerfiles for testing and production environments.

Open Image Spec

Contributed by: Josh Hawn – Link to PR

As we continue to grow the contributor community to the Docker project, we wanted to encourage more work in the area around how Docker constructs images and their layers. As a start, we have documented how Docker currently builds and formats images and their configuration. Our hope is that these details allow contributors to better understand this critical facet of Docker as well as help contribute to future efforts to improve the image format. The v1 image specification can be found here: https://github.com/docker/docker/blob/master/image/spec/v1.md

Acknowledgements

Many people worked hard on the features and fixes included in Docker 1.5. We’d like to thank Daniel Dao Quang Minh, Don Kjer, Harald Albers, Michal Minar, Phil Estes, Qiang Huang, Andrew Vagin, Abin Shahab, and the many other awesome contributors that helped make this release possible.

We would also like to thank people who contributed by testing the successive release candidates.

We hope you enjoy this release! This is just the beginning of a great year for Docker and we’re excited to see what other amazing things we can build together.

Like always, see you on IRC and happy hacking!

Thanks,

–The Docker maintainers–