Skip to content

Commit 2dbb427

Browse files
committed
Moved layers around so that nvm installs correctly.
1 parent a44821a commit 2dbb427

File tree

2 files changed

+25
-28
lines changed

2 files changed

+25
-28
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.6 (release date: 2016-01-11)
2+
3+
* Bugfix moved layers around for node `0.12.10`
4+
15
## 0.9.5 (release date: 2016-01-11)
26

37
* Updated NVM to switch to node `0.12.10`

Dockerfile

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,17 @@ CMD ["/sbin/my_init"]
88

99
# Nginx-PHP Installation
1010
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
1113
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
1214
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 \
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"
1820
RUN 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)
3823
RUN apt-get install -y nginx-full
3924

@@ -71,15 +56,6 @@ ADD build/index.php /var/www/public/index.php
7156
RUN chown -R www-data:www-data /var/www
7257
RUN 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
8460
RUN mkdir -p /etc/my_init.d
8561
ADD build/newrelic.sh /etc/my_init.d/newrelic.sh
@@ -90,6 +66,23 @@ ENV NR_INSTALL_SILENT 1
9066
ENV NR_INSTALL_KEY **ChangeMe**
9167
ENV 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
9487
ENV TERM=xterm
9588

0 commit comments

Comments
 (0)