I am trying to run cloudera/clusterdock in a docker image for a university project. This is my first time using docker and so far I have been using the instructions on the cloudera website which are a little sparse.
I successfully downloaded docker and the cloudera image and when I run the docker-images
command I get the following:
REPOSITORY TAG IMAGE ID CREATED SIZE
cloudera/clusterdock latest 9b4d4f1dda22 7 days ago 467.5 MB
When I try and run up the container with this image. Using the following command
docker run cloudera/clusterdock:latest /bin/bash
I get the following message
File "/bin/bash", line 1
SyntaxError: Non-ASCII character '\x80' in file /bin/bash on line 2,
but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Having read the pep mentioned pep I know I need to change the encoding in a file but the pep concentrates on python files and I am unaware of having a python file so have no idea where to find it to correct it. Also, having limited knowledge I am uneasy changing the bin/bash file as I know it can affect your machine.
Any help will have to assume I have little knowledge of this as I have little experience.
If you look at Dockerfile for cloudera/clusterdock:latest
, you can see:
ENTRYPOINT ["python"]
So, when you do docker run cloudera/clusterdock:latest /bin/bash
, you are basically doing python /bin/bash
inside the container. You will see the same error if you type that in your terminal, normally:
$ python /bin/bash
File "/bin/bash", line 1
SyntaxError: Non-ASCII character '\xe0' in file /bin/bash on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
You probably wanted to do:
docker run -it --entrypoint=/bin/bash cloudera/clusterdock:latest
Look at clusterdock.sh to see how actually the container is supposed to be run.
The associated docs (eg the description on the image's Docker Hub page or our blog post) describe that clusterdock is intended to be run by sourcing clusterdock.sh. This is required because the framework controls Docker on the host machine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.