Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start in ubuntu image #647

Open
wants to merge 3 commits into
base: source
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions dockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Pull base image.
FROM ubuntu

# Update image
RUN apt-get update

# Install Node.js
RUN apt-get install --yes curl
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install --yes nodejs

# Set the working directory to /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied where available (npm@5+)
COPY package*.json ./

# Bundle app source
COPY . ./

# Install app dependencies
RUN npm install && npm audit fix

# These commands unlike RUN (they are carried out in the construction of the container) are run when the container
CMD ["npm", "start"]