Docker (Ubuntu20.04) für CGI mit Python (2,7/3,6/3,7/3,8/3,9/3,10)
Dies ist eine einfache Python -Webservereinstellungen.
Mit diesem Docker -Bild können Sie eine einfache Webanwendung mit CGI erstellen.
Wie man benutzt
# build image
docker build -t pycgi .
# run image
HASH= ` docker run -p 8883:80 -d pycgi `
# exec container
docker exec -it $HASH /bin/bash
Sie können nach dem Auslauf -Docker -Container über die folgende URL zugreifen.
- Shell-Skript ... http: // localhost: 8883/cgi-binin2/sh.cgi
- Python2.7 ... http: // localhost: 8883/cgi-binin2/py27.cgi
- Python3.6 ... http: // localhost: 8883/cgi-binin2/py36.cgi
- Python3.7 ... http: // localhost: 8883/cgi-binin2/py37.cgi
- Python3.8 ... http: // localhost: 8883/cgi-binin2/py38.cgi
- Python3.9 ... http: // localhost: 8883/cgi-binin2/py39.cgi
- Python3.10 ... http: // localhost: 8883/cgi-binin2/py310.cgi
Erlauben Sie Python -Version
Referenzen
- Verwendung von Docker mit Apache2
- 【Linux】 Ruby で書いた CGI を Apache で動かしてみる (Japanisch)
Lizenz