Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
Single-node Hadoop cluster

In the below, we'll use the following to track the version of the image you'll use


Launching image

docker run -it --name hadoop_local -u chimpy -w /home/chimpy -e HOME=/home/chimpy -e TERM="$TERM" "bd4c/hadoop_local:v1.$dv" /bin/bash -l

This will drop you into a shell, no ssh'ing needed (or possible).

In this command, hadoop_local is the name of the docker instance; bd4c/hadoop_local:v1.$dv (eg bd4c/hadoop_local:v1.1) is the image that's run; the rest of the goop is to make the shell environment be the chimpy user

Re-connecting to an image

docker start -ai hadoop_local

where hadoop_local is the name of the image you used with the docker run ... command.

Committing a change

Whenever you like, you can commit any changes to the image and push them to the server

## see what's changed
docker diff hadoop_local
## Increment the version number, and commit it to a new tag
docker commit -m "demo change" hadoop_local bd4c/hadoop_local:v1.$((++dv))
## Push that new image
docker push bd4c/hadoop_local:v1.$dv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment