@@ -8,32 +8,17 @@ CMD ["/sbin/my_init"]
88
99# Nginx-PHP Installation
1010RUN apt-get update -y && apt-get install -y vim curl wget build-essential python-software-properties git-core
11+ RUN wget -O - https://download.newrelic.com/548C16BF.gpg | apt-key add - && \
12+ echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list
1113RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
1214RUN add-apt-repository -y ppa:ondrej/php5-5.6 && add-apt-repository -y ppa:nginx/stable
13- RUN apt-get update -y && sudo apt-get upgrade -y && apt-get install -y php5 php5-cli php5-fpm php5-mysqlnd \
15+ RUN apt-get update -y && sudo apt-get upgrade -y && apt-get install -yq php5 php5-cli php5-fpm php5-mysqlnd \
1416 php5-pgsql php5-curl php5-gd php5-mcrypt php5-intl php5-imap php5-tidy \
15- php-pear php5-xmlrpc
17+ php-pear php5-xmlrpc newrelic-php5
1618
1719# Run update timezone replace city with relevant city. eg. "Australia/Sydney"
1820RUN cp -p /usr/share/zoneinfo/Australia/Sydney /etc/localtime
1921
20- # Replace shell with bash so we can source files
21- RUN rm /bin/sh && ln -s /bin/bash /bin/sh
22-
23- # Install Node Version Manager and install node specific version
24- ENV NVM_DIR /usr/local/nvm
25- ENV NODE_VERSION 0.12.10
26-
27- # Install nvm with node and npm
28- RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \
29- && source $NVM_DIR/nvm.sh \
30- && nvm install $NODE_VERSION \
31- && nvm alias default $NODE_VERSION \
32- && nvm use default
33-
34- ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
35- ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
36-
3722# Install nginx (full)
3823RUN apt-get install -y nginx-full
3924
@@ -71,15 +56,6 @@ ADD build/index.php /var/www/public/index.php
7156RUN chown -R www-data:www-data /var/www
7257RUN chmod -R 755 /var/www
7358
74- # Install New Relic daemon
75- RUN apt-get update && \
76- apt-get -yq install wget && \
77- wget -O - https://download.newrelic.com/548C16BF.gpg | apt-key add - && \
78- echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt/sources.list.d/newrelic.list
79-
80- RUN apt-get update && \
81- apt-get -yq install newrelic-php5
82-
8359# Add New Relic APM install script
8460RUN mkdir -p /etc/my_init.d
8561ADD build/newrelic.sh /etc/my_init.d/newrelic.sh
@@ -90,6 +66,23 @@ ENV NR_INSTALL_SILENT 1
9066ENV NR_INSTALL_KEY **ChangeMe**
9167ENV NR_APP_NAME "Docker PHP Application"
9268
69+ # Replace shell with bash so we can source files
70+ RUN rm /bin/sh && ln -s /bin/bash /bin/sh
71+
72+ # Install Node Version Manager and install node specific version
73+ ENV NVM_DIR /usr/local/nvm
74+ ENV NODE_VERSION 0.12.10
75+
76+ # Install nvm with node and npm
77+ RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \
78+ && source $NVM_DIR/nvm.sh \
79+ && nvm install $NODE_VERSION \
80+ && nvm alias default $NODE_VERSION \
81+ && nvm use default
82+
83+ ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
84+ ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
85+
9386# Set terminal environment
9487ENV TERM=xterm
9588
0 commit comments