@@ -8,32 +8,17 @@ CMD ["/sbin/my_init"]
8
8
9
9
# Nginx-PHP Installation
10
10
RUN 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
11
13
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
12
14
RUN 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 \
14
16
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
16
18
17
19
# Run update timezone replace city with relevant city. eg. "Australia/Sydney"
18
20
RUN cp -p /usr/share/zoneinfo/Australia/Sydney /etc/localtime
19
21
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
-
37
22
# Install nginx (full)
38
23
RUN apt-get install -y nginx-full
39
24
@@ -71,15 +56,6 @@ ADD build/index.php /var/www/public/index.php
71
56
RUN chown -R www-data:www-data /var/www
72
57
RUN chmod -R 755 /var/www
73
58
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
-
83
59
# Add New Relic APM install script
84
60
RUN mkdir -p /etc/my_init.d
85
61
ADD build/newrelic.sh /etc/my_init.d/newrelic.sh
@@ -90,6 +66,23 @@ ENV NR_INSTALL_SILENT 1
90
66
ENV NR_INSTALL_KEY **ChangeMe**
91
67
ENV NR_APP_NAME "Docker PHP Application"
92
68
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
+
93
86
# Set terminal environment
94
87
ENV TERM=xterm
95
88
0 commit comments