This repository was archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (65 loc) · 2.07 KB
/
Dockerfile
File metadata and controls
72 lines (65 loc) · 2.07 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ubuntu:22.04
# Set correct environment variables
ENV DEBIAN_FRONTEND="noninteractive" HOME="/root" LC_ALL="C.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
ENV supervisor_conf /etc/supervisor/supervisord.conf
ENV security_conf /etc/apache2/conf-available/security.conf
ENV start_scripts_path /bin
# Update packages from baseimage
RUN apt-get update -qq
# Install and activate necessary software #neplan.io \
RUN apt-get upgrade -qy && apt-get install -qy \
apt-utils \
cron \
supervisor \
apache2 \
apache2-utils \
libexpat1 \
libcjose0 \
libcurl4 \
libjansson4 \
ssl-cert \
python3 \
php \
php-fpm \
php-mysql \
certbot \
python3-certbot-apache \
wget \
&& a2dismod php8.1 \
&& a2dismod mpm_prefork \
&& a2enmod mpm_event \
&& a2enmod ssl \
&& a2enmod http2 \
&& a2enmod proxy \
&& a2enmod proxy_http \
&& a2enmod proxy_balancer \
&& a2enmod lbmethod_byrequests \
&& a2enmod proxy_wstunnel \
&& a2enmod rewrite \
&& a2enmod headers \
&& a2enmod proxy_fcgi setenvif \
&& a2enconf php8.1-fpm \
&& a2dissite 000-default \
&& mkdir /var/www/letsencrypt \
&& mkdir /var/www/letsencrypt/.well-known \
&& chown -R www-data:www-data /var/www/letsencrypt \
&& chmod -R 750 /var/www/letsencrypt/.well-known \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /var/cache/* /var/tmp/* /tmp/* \
&& groupadd docker-data \
&& usermod -a -G docker-data,adm www-data
## libapache2-mod-auth-openidc \
## && a2enmod auth_openidc \
COPY supervisord.conf ${supervisor_conf}
COPY security.conf ${security_conf}
COPY 01_user_config.sh ${start_scripts_path}
COPY 02_auto_update.sh ${start_scripts_path}
COPY 03_set_a2port.sh ${start_scripts_path}
COPY start.sh /start.sh
RUN chmod +x ${start_scripts_path}/01_user_config.sh \
&& chmod +x ${start_scripts_path}/02_auto_update.sh \
&& chmod +x ${start_scripts_path}/03_set_a2port.sh \
&& chmod +x /start.sh
CMD ["./start.sh"]
VOLUME /etc/apache2/sites-enabled /etc/letsencrypt
EXPOSE 80/tcp 443/tcp