-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
58 lines (45 loc) · 1.39 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Docker file for python simple webservice build
FROM ubuntu:20.04
LABEL org.opencontainers.image.authors="[email protected]"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt -y install software-properties-common
RUN apt -y install apache2
RUN apt -y install wget
# Python2.7
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
RUN apt -y install libmysqlclient-dev python3-distutils
RUN apt -y install vim
RUN python3 get-pip.py
# Python3.6
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt -y install python3.6
RUN apt -y install python3.6-dev
RUN python3.6 get-pip.py
# Python3.7
RUN apt -y install python3.7
RUN apt -y install python3.7-dev
RUN python3.7 get-pip.py
# Python3.8
RUN apt -y install python3.8
# Python3.9
RUN apt -y install python3.9
# Python3.10
RUN apt -y install python3.10
# Http settings
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
RUN mkdir -p /production/www/cgi-bin
RUN mkdir -p /production/www/lib
COPY cgi-bin /production/www/cgi-bin
COPY lib /production/www/lib
COPY apache2 /etc/apache2
RUN ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load
EXPOSE 80
ENTRYPOINT [ "/usr/sbin/apache2" ]
CMD ["-D", "FOREGROUND"]