Docker(Ubuntu20.04) for cgi with python(2.7/3.6/3.7/3.8/3.9/3.10)
This is a simple python web server settings.
With this docker image, you can create simple web application with cgi.
How to use
# build image
docker build -t pycgi .
# run image
HASH=`docker run -p 8883:80 -d pycgi`
# exec container
docker exec -it $HASH /bin/bashYou can Access from the below URL after run docker container.
- Shell Script ... http://*lo*cal*host:8883/cgi-bin2/sh.cgi
- Python2.7 ... http://*localhost*:*8883/cgi-bin2/py27.cgi
- Python3.6 ... http://lo*cal**host:8883/cgi-bin2/py36.cgi
- Python3.7 ... http://localh*o*s*t:8883/cgi-bin2/py37.cgi
- Python3.8 ... http://localh*os*t*:8883/cgi-bin2/py38.cgi
- Python3.9 ... http://lo*calho*st*:8883/cgi-bin2/py39.cgi
- Python3.10 ... http://lo***calhost:8883/cgi-bin2/py310.cgi
Allow Python version
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
- 3.10
References
- Usage of docker with apache2
- 【Linux】Rubyで書いたCGIをApacheで動かしてみる(Japanese)
Licence
- MIT
下载源码
通过命令行克隆项目:
git clone https://github.com/pyohei/docker-cgi-python.git