-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Do not include local node_modules | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |