Skip to content

Commit 4c2fdf1

Browse files
authored
Add files via upload
First upload
0 parents  commit 4c2fdf1

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM php:7.2.26-apache
2+
3+
RUN apt-get update
4+
RUN apt-get upgrade -y
5+
6+
RUN apt-get install --fix-missing -y libpq-dev
7+
RUN apt-get install --no-install-recommends -y libpq-dev
8+
RUN apt-get install -y libxml2-dev libbz2-dev zlib1g-dev
9+
RUN apt-get -y install libsqlite3-dev libsqlite3-0 mariadb-client curl exif ftp
10+
RUN docker-php-ext-install intl
11+
RUN apt-get -y install --fix-missing zip unzip
12+
13+
# Composer
14+
RUN curl -sS https://getcomposer.org/installer | php
15+
RUN mv composer.phar /usr/local/bin/composer
16+
RUN chmod +x /usr/local/bin/composer
17+
RUN composer self-update
18+
19+
ADD conf/apache.conf /etc/apache2/sites-available/000-default.conf
20+
21+
ADD startScript.sh /startScript.sh
22+
RUN chmod +x /startScript.sh
23+
24+
RUN cd /var/www/html
25+
26+
RUN composer create-project codeigniter4/appstarter codeigniter4 -s rc
27+
RUN chmod -R 0777 /var/www/html/codeigniter4/writable
28+
29+
RUN mv /var/www/html/codeigniter4 /var/tmp/
30+
31+
RUN apt-get clean \
32+
&& rm -r /var/lib/apt/lists/*
33+
34+
EXPOSE 80
35+
VOLUME ["/var/www/html", "/var/log/apache2", "/etc/apache2"]
36+
37+
CMD ["bash", "/startScript.sh"]
38+

conf/apache.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<VirtualHost *:80>
2+
ServerAdmin webmaster@localhost
3+
DocumentRoot "/var/www/html/codeigniter4/public"
4+
ServerName localhost
5+
<Directory "/var/www/html/codeigniter4/public/">
6+
AllowOverride all
7+
</Directory>
8+
</VirtualHost>

startScript.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
mv /var/tmp/codeigniter4 /var/www/html/
3+
4+
/usr/sbin/apache2ctl -D FOREGROUND

0 commit comments

Comments
 (0)