Last active
October 17, 2022 22:34
-
-
Save greenbicycle/529474ea00667a9c08fb78bcdf5f063a to your computer and use it in GitHub Desktop.
Sample Ubuntu Dockerfile
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
# | |
# Ubuntu with Apache and PHP7.4 | |
# | |
#FROM ubuntu:latest | |
FROM ubuntu/apache2 | |
RUN apt-get update && apt-get upgrade -y | |
ARG DEBIAN_FRONTEND=noninteractive | |
ENV TZ=America/Phoenix | |
# RUN apt-get install -y tzdata# | |
RUN apt-get install ca-certificates apt-transport-https software-properties-common -y | |
RUN apt-add-repository ppa:ondrej/php -y | |
RUN apt-get update && apt-get install \ | |
php7.4 \ | |
git \ | |
wget \ | |
unzip \ | |
rsync \ | |
curl \ | |
keychain \ | |
libapache2-mod-php \ | |
php7.4-curl \ | |
php7.4-intl \ | |
php7.4-mbstring \ | |
php7.4-zip \ | |
php7.4-gd \ | |
php7.4-bcmath \ | |
php7.4-ldap \ | |
php7.4-mysql \ | |
php7.4-mysqlnd \ | |
php7.4-xml -y && apt-get clean | |
VOLUME /usr/local/sbin | |
VOLUME /etc/apache2/sites-available/ | |
VOLUME /etc/apache2/ssl | |
VOLUME /var/www/vhosts | |
RUN a2enmod headers && a2enmod ssl && a2enmod rewrite && a2dismod php8.1 && a2enmod php7.4 | |
RUN update-alternatives --set php /usr/bin/php7.4 | |
EXPOSE 80 | |
EXPOSE 443 | |
CMD /usr/sbin/apache2ctl -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment