docker run -it /bin/bash --hostname d01 --name d01 -d -p 8081:80 --volume=:/var/www/html/app --volume=:/var/www/data lms/d01
Last active
April 1, 2022 05:22
-
-
Save developerck/0e0c64b050a78be02d5fd977b52dd18b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerName localhost | |
<VirtualHost *:80> | |
DocumentRoot /var/www/html/app | |
<Directory /var/www/html/app> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
LABEL copyright=developerck | |
LABEL by=developerck@gmail.com | |
ENV TZ=UTC | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN apt update -y && apt install -y \ | |
sudo \ | |
apache2 \ | |
wget \ | |
git \ | |
curl | |
RUN sudo apt install -y software-properties-common | |
RUN sudo add-apt-repository ppa:ondrej/php | |
RUN sudo apt update -y | |
RUN sudo apt install -y \ | |
php7.2 \ | |
php7.2-common \ | |
php7.2-curl \ | |
php7.2-dev \ | |
php7.2-fpm \ | |
php7.2-gd \ | |
php7.2-json \ | |
php7.2-intl \ | |
php7.2-mbstring \ | |
php7.2-mcrypt \ | |
php7.2-mysql \ | |
php7.2-memcached \ | |
php7.2-opcache \ | |
php7.2-zip \ | |
php7.2-xml \ | |
php7.2-redis \ | |
libapache2-mod-php7.2 | |
RUN sudo apt install -y \ | |
mysql-client \ | |
&& apt clean all && rm -rf /var/cache/yum | |
RUN update-alternatives --set php /usr/bin/php7.2 | |
RUN apt install -y locales && locale-gen en_AU.UTF-8 | |
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf | |
COPY start-apache /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/start-apache | |
RUN mkdir -p /var/www/html/app | |
RUN mkdir -p /var/www/data | |
RUN a2enmod rewrite | |
RUN a2enmod headers | |
RUN service apache2 restart | |
CMD ["start-apache"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf | |
sed -i "s/:80/:${PORT:-80}/g" /etc/apache2/sites-enabled/* | |
source /etc/apache2/envvars | |
apachectl -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment