Apache Hadoop 2.4.1 on Docker Janos Matyas 25 June 2014

A few weeks ago we have released an Apache Hadoop 2.3 Docker image – in a very short time this become the most popular Hadoop image in the Docker registry.

Following on the success of our Hadoop 2.3 Docker image, the feedbacks and requests we have received and aligning with the Hadoop release cycle, we have released an Apache Hadoop 2.4.1 Docker image – same as the previous version this is available as a trusted and automated build on the official Docker registry.

Please note that beside this Hadoop image, we have released and maintain a pseudo-distributed and distributed Hadoop Docker image provisioned with Apache Ambari. As they are provisioned with Ambari you have the option to change, add and remove Hadoop components using cluster blueprints.

Build the image

In case you’d like to try directly from the Dockerfile you can build the image as:

1
docker build  -t sequenceiq/hadoop-docker .

Pull the image

As it is also released as an official Docker image from Docker’s automated build repository – you can always pull or refer the image when launching containers.

1
docker pull sequenceiq/hadoop-docker:2.4.1

Start a container

In order to use the Docker image you have just build or pulled use:

1
docker run -i -t sequenceiq/hadoop-docker /etc/bootstrap.sh -bash

Testing

You can run one of the stock examples:

1
2
3
4
5
6
cd $HADOOP_PREFIX
# run the mapreduce
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.4.1.jar grep input output 'dfs[a-z.]+'

# check the output
bin/hdfs dfs -cat output/*

Hadoop native libraries, build, Bintray, etc

The Hadoop build process is no easy task – requires lots of libraries and their right version, protobuf, etc and takes some time – we have simplified all these, made the build and released a 64b version of Hadoop nativelibs on our Bintray repo. Enjoy.

Comments

Recent Posts