Skip to content

Docker base images for python 2/3

Notifications You must be signed in to change notification settings

butter/docker-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Supported tags and respective Dockerfile links

What is Python?

Python is an interpreted, interactive, object-oriented, open-source programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many Unix variants, on the Mac, and on Windows 2000 and later.

wikipedia.org/wiki/Python_(programming_language)

logo

How to use this image

Create a Dockerfile in your Python app project

FROM butter/python:3.6.2
CMD [ "python", "./your-daemon-or-script.py" ]

or (if you need to use Python 2):

FROM butter/python:2.7.13
CMD [ "python", "./your-daemon-or-script.py" ]

Run a single Python script

For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a Python script by using the Python Docker image directly:

$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp butter/python:3 python your-daemon-or-script.py

or (again, if you need to use Python 2):

$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp butter/python:2 python your-daemon-or-script.py

License

View license information for Python 2 and Python 3.

About

Docker base images for python 2/3

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published