Last active
August 10, 2016 18:09
-
-
Save andrewconnell/4b86ffd69b290a7f8b3cd85aa86957d1 to your computer and use it in GitHub Desktop.
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
FROM node:5.11.1 | |
RUN mkdir -p /home/nodejs && \ | |
groupadd -r nodejs && \ | |
useradd -r -g nodejs -d /home/nodejs -s /sbin/nologin nodejs && \ | |
chown -R nodejs:nodejs /home/nodejs && \ | |
mkdir -p /voyager/app && \ | |
chown -R nodejs:nodejs /voyager/app && \ | |
npm install -g nodemon | |
# add NPM packages, typescript & typings configs | |
COPY package.json /voyager/app/ | |
# copy node_modules... can't use NPM install because package references | |
# to private repos aren't accessible within container | |
COPY node_modules /voyager/app/node_modules | |
# copy transpiled JS => app | |
COPY dist /voyager/app/dist | |
EXPOSE 8080 | |
# change the working directory to the app's folder | |
WORKDIR /voyager/app | |
# set user to nodejs & run | |
USER nodejs | |
CMD npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment