A Sample React.js Application Boilerplate with Docker created using create-react-app.
273
A Sample React.js Application Boilerplate with Docker created using create-react-app.
For development, you will need Docker, Node.js, a node global package like npm, pnpm or yarn, installed in your environment.
You can download and install Docker on multiple platforms from docs.docker.com.
You can download and install docker-compose on multiple platforms from docs.
Just go on official Node.js website and download the installer.
Also, be sure to have git available in your PATH, npm might need it (You can find git here).
You can install nodejs and npm easily with apt install, just run the following commands.
$ sudo apt install nodejs
$ sudo apt install npm
You can find more information about the installation on the official Node.js website, official NPM website, official PNPM website and official YARN website.
If the installation was successful, you should be able to run the following command.
$ node --version
v14.18.1
$ npm --version
6.14.15
$ pnpm --version
7.5.1
$ yarn --version
1.22.10
If you need to update npm, you can make it using npm! Cool right? After running the following command, just open again the command line and be happy.
$ npm install npm -g
$ git clone https://github.com/bankerneel/react-sample-docker-app
$ cd react-sample-docker-app
$ npm install
$ pnpm install
$ yarn install
$ npm start
$ npm run buld
$ npm install -g serve
$ serve -s build
$ docker build -f Dockerfile.dev -t $CONTAINER_NAME .
$ docker build -f Dockerfile.prod -t $CONTAINER_NAME .
$ docker run -p 3000:3000 $CONTAINER_NAME
$ docker run -p 80:80 -d $CONTAINER_NAME
$ docker-compose -f docker-compose.dev.yaml up -d --build
$ docker-compose -f docker-compose.prod.yaml up -d --build
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Content type
Image
Digest
Size
443.8 MB
Last updated
over 4 years ago
docker pull bankerneel/react-sample-docker-app