Docker has added new official repositories for language stacks to the Docker Hub, including C/C++, Java, Python or Ruby.
The list of official repositories was initially announced back in June at DockerCon with CentOS, Ubuntu and Fedora images amongst others, mostly operating systems and popular servers. Based on user feedback and popular demand, Docker has added official repositories for several language stacks:
- C/C++ and the GNU Compiler Collection (GCC) versions 4.6, 4.7, 4.8 and 4.9.
- Clojure in conjunction with Leiningen 2.4.3 and 2.5.0.
- Go language (golang) versions 1.2 and 1.3.
- Hy language (hylang) version 0.10.
- Java JDK versions 6, 7, and 8.
- NodeJS 0.8, 0.10 and 0.11.
- Perl 5.18 and 5.20.
- PHP 5.3, 5.4, 5.5 and 5.6.
- Python 2.7.8, 3.3.5 and 3.4.1.
- Ruby on Rails 4.1.
- Ruby 1.9.3, 2.0.0 and 2.1.3.
Each of the repositories includes multiple tags and aliases to help select the correct version. The Java repository for instance, includes images for Java 6 java:6b32
, 7 java:7u65
and 8 java:8u40
, including patch versions, such as java:7u60
, and aliases java:6
, java:7
and java:8
. Note that, although useful for development, using one of such aliases may cause unintended upgrades when run in a different machine, in the same way as using the latest
tag, as Docker would pull the latest image available at that moment. For example docker pull java:7
will result in a different image when a new Docker image for the next patch version of Java 7 is published.
Most of the images derive from Debian base images, Jessie, Wheezy or Sid, or from buildpack-deps
, an image that includes a large number of development header packages needed by various things like RubyGems or PyPI modules. The source Dockerfiles can be found under the docker-library projects on GitHub.
Some of the images include ONBUILD
directives to make it easier to deploy applications. For example, when extending ruby:2.1.3-onbuild
it will use the Gemfile
and Gemfile.lock
files in the build directory to install all required gems with bundler into the resulting image system Ruby, without needing to add any extra directive.
Docker also opens the door for anyone to create and maintain official repositories of their own projects, and published some guidelines for getting started and Dockerfile best practices. Requests to add the repository to the Docker Hub can be sent to partners@docker.com.