Created
October 4, 2020 21:23
-
-
Save beniusij/715c8a0e32109efd1ade8edd52432635 to your computer and use it in GitHub Desktop.
Basic Dockerfile for React applications created with create-react-app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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