https://github.com/pyohei/docker-cgi-python
🐳Docker file for cgi using python2.7, 3.6, 3.7, 3.8, 3.9 and 3.10🐍
https://github.com/pyohei/docker-cgi-python
apache2 cgi docker python2 python27 python3 python310 python36 python37 python38 python39 ubuntu1804
Last synced: about 1 month ago
JSON representation
🐳Docker file for cgi using python2.7, 3.6, 3.7, 3.8, 3.9 and 3.10🐍
- Host: GitHub
- URL: https://github.com/pyohei/docker-cgi-python
- Owner: pyohei
- License: mit
- Created: 2017-05-26T13:35:27.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T13:00:08.000Z (almost 3 years ago)
- Last Synced: 2025-09-01T12:55:30.550Z (about 1 month ago)
- Topics: apache2, cgi, docker, python2, python27, python3, python310, python36, python37, python38, python39, ubuntu1804
- Language: Dockerfile
- Homepage: https://medium.com/@pyohei/create-the-simple-image-server-with-python-f8b4b8607485?source=friends_link&sk=684aadf8462ae0f2facb5ce3a737c860
- Size: 31.3 KB
- Stars: 16
- Watchers: 1
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
# build image
docker build -t pycgi .
# run image
HASH=`docker run -p 8883:80 -d pycgi`
# exec container
docker exec -it $HASH /bin/bash
```You can Access from the below URL after run docker container.
* Shell Script ... [http://localhost:8883/cgi-bin2/sh.cgi](http://localhost:8883/cgi-bin2/sh.cgi)
* Python2.7 ... [http://localhost:8883/cgi-bin2/py27.cgi](http://localhost:8883/cgi-bin2/py27.cgi)
* Python3.6 ... [http://localhost:8883/cgi-bin2/py36.cgi](http://localhost:8883/cgi-bin2/py36.cgi)
* Python3.7 ... [http://localhost:8883/cgi-bin2/py37.cgi](http://localhost:8883/cgi-bin2/py37.cgi)
* Python3.8 ... [http://localhost:8883/cgi-bin2/py38.cgi](http://localhost:8883/cgi-bin2/py38.cgi)
* Python3.9 ... [http://localhost:8883/cgi-bin2/py39.cgi](http://localhost:8883/cgi-bin2/py39.cgi)
* Python3.10 ... [http://localhost:8883/cgi-bin2/py310.cgi](http://localhost: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](https://www.dockerbook.com/code/6/jekyll/apache/Dockerfile)
* [【Linux】Rubyで書いたCGIをApacheで動かしてみる](http://note.kurodigi.com/apache-cgi/)(Japanese)### Licence
* [MIT](https://github.com/pyohei/docker-cgi-python/blob/master/LICENSE)