Last active
January 12, 2017 04:05
-
-
Save azam/f2b46dc46205a543d559236f8280a1ec to your computer and use it in GitHub Desktop.
Dockerfile for create-react-app, since I don't want to polute my node global modules. Creates a temporary project on build and removes it afterward, to cache the latest packages on build-time. Build: `docker build -t azam/create-react-app`. Usage: `docker run --rm -v $PWD:/project azam/create-react-app my-project-name`
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:6-alpine | |
RUN npm install -g create-react-app \ | |
&& mkdir /project \ | |
&& cd /project \ | |
&& /usr/local/bin/create-react-app tmp-project \ | |
&& rm -rf ./tmp-project | |
WORKDIR /project | |
ENTRYPOINT ["/usr/local/bin/create-react-app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment