Skip to content

Instantly share code, notes, and snippets.

@ZackStone
Created March 5, 2019 07:39
Show Gist options
  • Save ZackStone/ef50fce1ce8f0c4dcf0219f5e5d9c61d to your computer and use it in GitHub Desktop.
Save ZackStone/ef50fce1ce8f0c4dcf0219f5e5d9c61d to your computer and use it in GitHub Desktop.
Arquivo Dockerfile para uma api em nodejs.
FROM node:8
# Create app directory
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 ./
# RUN npm install
# If you are building your code for production
RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment