sequenceiq / hadoop-docker

Hadoop docker image
https://registry.hub.docker.com/u/sequenceiq/hadoop-docker/
Apache License 2.0
1.21k stars 561 forks source link

Report of Using hadoop-docker in Docker Toolkit in Windows #37

Open medined opened 8 years ago

medined commented 8 years ago

Hi. Just in case anyone wants to use this image in Windows. I did the following. In the Docker Toolbox, you can run the Docker Quickstart Terminal. In the terminal, you can issue Docker commands. However, winpty is needed if you want an interactive session with your Docker container. There are some issues with how winpty passes the command line to Docker.

In order to start your image, I needed to re-tag it to avoid the slash:

docker tag sequenceiq/hadoop-docker hadoop-docker

Once that was done, I found that I could not pass the /etc/bootstrap.sh on the command line. winpty had trouble. Instead I ran this:

winpty docker run -it hadoop-docker bash

Once inside the container, I ran the bootstrap script and was able to use the hdfs command immediately after.

/etc/bootstrap.sh bash
/usr/local/hadoop/bin/hdfs dfs -ls /

Thanks!