免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年3月4日 星期三

docker image for python


https://registry.hub.docker.com/_/python/

$ docker pull python:2.7
or
$ docker pull python:2.7.9 ???


$ docker images
python 2.7 31ff30c97af1 3 weeks ago 745.2 MB


$ docker run -it --rm --name mypy python:2.7
[python console]


$ docker run -it --rm --name mypy python:2.7 bash
[bash shell]

root@83810d5676d0:/# pip --version
pip 6.0.8 from /usr/local/lib/python2.7/site-packages (python 2.7)

root@83810d5676d0:/# virtualenv --version
12.0.7

root@83810d5676d0:/# python --version
Python 2.7.9



//=== https://github.com/docker-library/python/blob/25134c1757699a357936b94924a97536f9526040/2.7/Dockerfile

* python:2.7 Dockerfile based on "jessie"

"""...
FROM buildpack-deps:jessie

# remove several traces of debian python
RUN apt-get purge -y python.*

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

ENV PYTHON_VERSION 2.7.9

# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF

...


..."""


//=== https://github.com/docker-library/python/blob/d550e292eec57e83af58e05410243d387d6483a8/2.7/onbuild/Dockerfile

* python:2.7-onbuild Dockerfile based on python:2.7.9

"""
FROM python:2.7.9

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ONBUILD COPY requirements.txt /usr/src/app/
ONBUILD RUN pip install -r requirements.txt

ONBUILD COPY . /usr/src/app

"""


//=== python:2.7.9-wheezy, 2.7-wheezy, 2-wheezy (2.7/wheezy/Dockerfile)
python image based on "wheezy"

FROM buildpack-deps:wheezy



沒有留言:

張貼留言