Skip to content

Instantly share code, notes, and snippets.

@esron
Last active April 29, 2019 12:56
Show Gist options
  • Select an option

  • Save esron/551d5ce184db005ba7301d349f65d6d7 to your computer and use it in GitHub Desktop.

Select an option

Save esron/551d5ce184db005ba7301d349f65d6d7 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
LABEL Author="Esron Silva esron.silva@sysvale.com"
ENV PATH ${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y software-properties-common \
apache2 \
curl \
language-pack-en-base
# Add PHP ondrej repository
RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update && apt-get upgrade -y
# Install php and its libraries
RUN apt -y install php7.2 \
php7.2-mbstring \
php7.2-xml \
php7.2-curl \
php7.2-mysql \
php7.2-pgsql \
php7.2-imagick \
php7.2-zip \
libxrender1 \
libfontconfig1 \
libxtst6
# Install nodejs and npm
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g n npm@latest
RUN n 8.*
# Install Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN php -r "unlink('composer-setup.php');"
# Apachelinker script
COPY apachelinker.sh /usr/local/bin/apachelinker
# Apache config
RUN a2enmod rewrite
COPY apache.conf /etc/apache2/sites-enabled/000-default.conf
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /home/project-folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment