jacky9813 / apache-python-template

A template project for docker-compose to run Apache HTTP Server with Python 3 CGI Support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template Project for Apache HTTP Server with Python 3 CGI Support

Directories

  • apache-python-image: Where the Dockerfile for main image is defined
  • cgi-bin: Where Python script is located
  • htdocs: Static web page

Run

To run this image, simply issue the command

# docker-compose up

or

# docker-compose up -d

with detached shell.

Python Module

To add module(s) to Python 3 either using PIP or APT, rewrite Dockerfile in apache-python-image like:

FROM httpd:2.4
RUN apt-get update && apt-get install -y python3 apt-utils coreutils python3-pip python3-SOMEMODULE && apt-get upgrade -y
RUN pip3 install SOMEMODULE

And then rebuild it with command

# docker-compose up --build

About

A template project for docker-compose to run Apache HTTP Server with Python 3 CGI Support


Languages

Language:Python 76.6%Language:HTML 16.2%Language:Dockerfile 7.2%