2017-04-22 73 views

回答

0

你可以开始你Dockerfile这样的:

FROM python:3-wheezy 

RUN apt-get update && apt-get install -y git ca-certificates 

RUN pip install -q nltk 

#optionally your other docker commands here 

然后生成并运行容器。

观测数据:这是一个正式的Debian基于容器(与Ubuntu兼容),如果你喜欢一个纯粹的Ubuntu的容器代替“巨蟒:3喘息”与从ubuntu14

+1

标题说“ubuntu”和这个dockerfile是debian –

+0

非常感谢你 – Ankur100

1

建“dominga/uwsgi-python3”这里有一个Dockerfile其通过python3-nltk Debian软件包安装nltk(并且证明它确实有效)

FROM ubuntu:xenial 
RUN apt-get update && \ 
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 
     python3-nltk && \ 
    rm -rf /var/lib/apt/lists/* 
CMD ["python3", "-c", "import nltk"] 

注意,apt-get样板,建议在the dockerfile best practices

+0

非常感谢。我会试试看。 – Ankur100