Skip to content

Instantly share code, notes, and snippets.

@AndrewBestbier
Last active August 22, 2019 22:06
Show Gist options
  • Save AndrewBestbier/dcd54d7b43e65fa00145b3b60d7f366d to your computer and use it in GitHub Desktop.
Save AndrewBestbier/dcd54d7b43e65fa00145b3b60d7f366d to your computer and use it in GitHub Desktop.
Dockerfile
# Use an official Node runtime as a parent image
FROM node:12.7.0-alpine
# Set the working directory to /app
WORKDIR '/app'
# Copy package.json to the working directory
COPY package.json .
# Install any needed packages specified in package.json
RUN yarn
# Copying the rest of the code to the working directory
COPY . .
# Make port 3000 available to the world outside this container
EXPOSE 3000
# Run index.js when the container launches
CMD ["node", "index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment