Skip to content

Instantly share code, notes, and snippets.

@mosesliao
Last active January 23, 2021 08:08
Show Gist options
  • Save mosesliao/d981f0656a61230c0cef48c97952d478 to your computer and use it in GitHub Desktop.
Save mosesliao/d981f0656a61230c0cef48c97952d478 to your computer and use it in GitHub Desktop.
DephpuggerDocker
FROM drupal:7.59-apache
LABEL company="Singapore Press Holdings Ltd" \
maintainer="Moses Liao<moseslgz@sph.com.sg>"
RUN pecl update-channels;
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install memcached
RUN apt-get update -y && apt-get install -y \
zlib1g \
zlib1g-dev \
libmemcached-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached
## Add in dephpugger
RUN composer global require guzzle/guzzle
RUN composer global require tacnoman/dephpugger
RUN composer global config bin-dir --absolute
RUN composer global update --no-scripts
ENV PATH="/root/.composer/vendor/bin:${PATH}"
## Install xdebug
RUN pecl install xdebug && docker-php-ext-enable xdebug
## Check to make sure that all the necessary modules are available.
# 1) MySQL
# 2) memcached
RUN php -m
RUN rm -rf /tmp/pear ~/.pearrc
RUN composer global dump-autoload
RUN dephpugger requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment