尝试在Docker中运行Cloudera Image [英] Trying to run Cloudera Image in Docker

查看:92
本文介绍了尝试在Docker中运行Cloudera Image的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在大学项目的docker映像中运行cloudera / clusterdock。这是我第一次使用docker,到目前为止,我一直在使用cloudera网站上的说明,该说明有点稀疏。

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.

我成功下载了docker和cloudera映像,当我运行 docker-images 命令时,我得到以下信息:

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

我收到以下消息

    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

具有阅读pep提到的pep,我知道我需要更改文件中的编码,但是pep专注于python文件,并且我不知道有python文件,因此不知道在哪里可以找到要更正的文件。另外,由于知识有限,我不易更改bin / bash文件,因为我知道它会影响您的计算机。

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.

推荐答案

如果您查看 cloudera / clusterdock:latest 的clusterdock / blob / master / Dockerfile#L54 rel = noreferrer> Dockerfile ,您可以看到:

If you look at Dockerfile for cloudera/clusterdock:latest, you can see:

ENTRYPOINT ["python"]

因此,当您执行 docker运行cloudera / clusterdock:latest / bin / bash 时,基本上就是在执行 python / bin / bash 放在容器中。如果在终端中键入该错误,通常会看到相同的错误:

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

您可能想做的事:

docker run -it --entrypoint=/bin/bash cloudera/clusterdock:latest

查看 clusterdock.sh 来查看应该如何实际运行容器。

Look at clusterdock.sh to see how actually the container is supposed to be run.

这篇关于尝试在Docker中运行Cloudera Image的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆