Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imammubin/0ca51603f38e9352b355d19662596562 to your computer and use it in GitHub Desktop.
Save imammubin/0ca51603f38e9352b355d19662596562 to your computer and use it in GitHub Desktop.
# source-docker-ubuntu1804-apache2-php73-composer-for-laravel7
FROM ubuntu:18.04
# Identify the maintainer of an image
LABEL maintainer="imammubin.net@gmail.com"
# Update the image to the latest packages
RUN apt-get update && apt-get upgrade -y
## preesed tzdata, update package index, upgrade packages and install needed software
RUN echo "tzdata tzdata/Areas select Asia" > /tmp/preseed.txt; \
echo "tzdata tzdata/Zones/Asia select Jakarta" >> /tmp/preseed.txt; \
debconf-set-selections /tmp/preseed.txt && \
apt-get update && \
apt-get install -y tzdata
# Install PHP and other utility
RUN apt-get install build-essential software-properties-common apache2 sudo curl zip unzip git nano vim -y
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
RUN apt-get update && apt-get -y install phpunit php7.3 php7.3-curl php7.3-mcrypt php7.3-mbstring
#RUN sed -i 's|DocumentRoot|ServerName localhost \n DocumentRoot|g' /etc/apache2/sites-available/000-default.conf
RUN echo 'ServerName localhost' >> /etc/apache2/sites-available/000-default.conf
# Install composer
RUN curl -Ss https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
WORKDIR /var/www/html
#RUN Apache
EXPOSE 80
CMD ["apachectl", "-D", "FOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment