Skip to content

Instantly share code, notes, and snippets.

@beniusij
Created October 4, 2020 21:23
Show Gist options
  • Save beniusij/715c8a0e32109efd1ade8edd52432635 to your computer and use it in GitHub Desktop.
Save beniusij/715c8a0e32109efd1ade8edd52432635 to your computer and use it in GitHub Desktop.
Basic Dockerfile for React applications created with create-react-app
FROM node:12.8.1-alpine
# Set working directory
WORKDIR /
# Copy package.json and yarn.lock
COPY ./package.json ./yarn.lock ./
# Install node modules
RUN yarn install
# Copy source code into the image
COPY . .
# start app
CMD ["yarn", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment