Skip to content

Commit

Permalink
Merge 9fb37f0 into b493c7b
Browse files Browse the repository at this point in the history
  • Loading branch information
estroz committed Jan 28, 2017
2 parents b493c7b + 9fb37f0 commit a8dab9e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Do not include local node_modules
node_modules/
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
FROM nginx
MAINTAINER Jordan Schalm <jordan.schalm@gmail.com>
FROM nginx:1.11.9
MAINTAINER Eric Stroczynski <ericstroczynski@gmail.com>

RUN apt-get update && apt-get install -y nodejs npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
# Ensure env is up to date and clean, and install curl
RUN apt-get update \
&& apt-get clean \
&& apt-get install -y curl \
xz-utils
# Install nodeJS and link npm and nodejs to /usr/local/bin
RUN cd /usr/local \
&& \curl -LO https://nodejs.org/dist/v6.9.4/node-v6.9.4-linux-x64.tar.xz \
&& tar -Jxvf node-v6.9.4-linux-x64.tar.xz \
&& mv ./node-v6.9.4-linux-x64 nodejs \
&& ln -s /usr/local/nodejs/bin/node /usr/bin/node \
&& ln -s /usr/local/nodejs/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npm

ENV NGINX_ROOT /usr/share/nginx/html

# Copy in source code and install deps/build project
COPY . $NGINX_ROOT
RUN cd $NGINX_ROOT && npm install
RUN cd $NGINX_ROOT && npm run build
RUN cd $NGINX_ROOT \
&& npm install \
&& npm run build

0 comments on commit a8dab9e

Please sign in to comment.