Skip to content

Instantly share code, notes, and snippets.

@polds
Created April 1, 2015 15:49
Show Gist options
  • Select an option

  • Save polds/1c87f466257ce0da88f0 to your computer and use it in GitHub Desktop.

Select an option

Save polds/1c87f466257ce0da88f0 to your computer and use it in GitHub Desktop.
Dockerfiles
FROM kyani/modx:latest
RUN apt-get update
RUN apt-get -yqq install wget
RUN apt-get -yqq install python-setuptools
RUN easy_install pip
RUN mkdir -p /opt/newrelic
WORKDIR /opt/newrelic
RUN wget -r -nd --no-parent -Alinux.tar.gz \
http://download.newrelic.com/php_agent/release/ >/dev/null 2>&1 \
&& tar -xzf newrelic-php*.tar.gz --strip=1
ENV NR_INSTALL_SILENT true
ENV NR_INSTALL_KEY MY_LICENSE_KEY
RUN bash newrelic-install install
WORKDIR /
RUN pip install newrelic-plugin-agent
RUN mkdir -p /var/log/newrelic
RUN mkdir -p /var/run/newrelic
FROM kyani/newrelic-php:latest
ADD config /usr/local/etc/php/conf.d/
ADD src/html /var/www/html
ADD src/app /var/www/app
# Clear out the cache file
ONBUILD RUN ["rm", "-f", "/var/www/html/assets/cache/*.idx.php"]
RUN ["chown", "-R", "www-data:www-data", "/var/www/html"]
CMD ["apache2", "-DFOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment