Skip to content

Instantly share code, notes, and snippets.

@mrpehlivan
Created January 17, 2021 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrpehlivan/e0a723f35368126a20a8af7ad1d54d0b to your computer and use it in GitHub Desktop.
Save mrpehlivan/e0a723f35368126a20a8af7ad1d54d0b to your computer and use it in GitHub Desktop.
Dockerfile.react
# Run app with specific docker version
FROM node:12-slim
# Add description
LABEL description="This is the base docker image for the Basic react application."
# Add maintainer information
LABEL maintainer = ["m.arifpehlivan@gmail.com"]
# Create app directory
WORKDIR /usr/src/app
# Expose port for service
EXPOSE 3000
# Copy source code to image
COPY . .
# Install packages
RUN npm install
# Run app
CMD [ "npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment