2017-04-22 25 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