Skip to content

pixhub/docker_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

docker_python

This Dockerfile provides you a full Python 2/3 environment. Including pip, pip2, pip3, pyhton-tk.

Building the container

First of all, you must download this repo and build the Docker image

cd $HOME
git clone https://git.pixhub.fr/pixhub/docker_python
docker build -y some-name docker_python

Running the container with interactive Display

With TKinter and Turtle, you can build Apps in Python with interactive Window. In my case, i got a folder containing all my Python Scripts which I mount inside the container. If you want the container intercating with your Host's desktop just copy/paste the following :

docker run --rm -ti -v /tmp/.X11-unix:/tmp/.X11-unix \
                    -v /your/python/files/path:/app \
                    -e DISPLAY=$DISPLAY \
                    -u python some-name /bin/bash

Want to Test ?

Now you're inside the container type the following :

python3
>>> from turtle import *
>>> forward(200)

As you can see, a window pop on your screen with what you typed just before.

Enjoy !

Best regards, pixhub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published