In the below, we'll use the following to track the version of the image you'll use
dv=1
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
docker start -ai hadoop_local
where hadoop_local
is the name of the image you used with the docker run ...
command.
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