-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 852 Bytes
/
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
FROM ubuntu:22.04
# Install Apache2
RUN apt-get update
RUN apt-get install apt-utils
RUN apt-get install -y apache2
# Install PHP
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Paris"
RUN apt-get update
RUN apt-get install -y php libapache2-mod-php
# Always usefull for debug
RUN apt-get install -y net-tools vim
# Install MySQL
RUN apt-get install -y mysql-server php-mysql
# Apache2 configuration
COPY config/apache2.conf /etc/apache2/apache2.conf
COPY config/000-default.conf /etc/apache2/sites-available/000-default.conf
# Application data
COPY ./bricks/ /var/www/bricks/
RUN chmod -R 777 /var/www/bricks/
# activate the mysqli extension in the php config
RUN echo 'extension=mysqli' >> /etc/php/8.1/cli/php.ini
# Setup the SQL database
COPY config/setup.sql /setup.sql
COPY run.sh /run.sh
RUN chmod +x /run.sh
EXPOSE 80
CMD ["/run.sh"]