alex-agency / react-docker

Dockerfile for Yeoman with ReactJS generators

Home Page:https://hub.docker.com/r/alexagency/react-yeoman/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alexagency/react-yeoman

Dockerfile for Yeoman with React generators

Installation

Install Docker Machine.

Create virtual machine:

docker-machine create -d virtualbox dev

Get IP address:

docker-machine ip dev

Connect to virtual machine:

docker-machine ssh dev

Go to shared (between host and virtualbox) home directory:

cd /Users/<MAC USER>
cd /c/Users/<WINDOWS USER>

Run alexagency/react-yeoman container from Docker Hub:

docker run -it --rm -p 3000:3000 -p 3001:3001 -v $(pwd)/react:/app alexagency/react-yeoman

Initiate one of Yeoman generators:

React Starter Kit:

yo react-fullstack

React Static Boilerplate:

yo react-static

ReactJS and Webpack:

yo react-webpack

Check generated project:

/Users/<MAC USER>/react
/c/Users/<WINDOWS USER>/react

Install Node.js components:

npm install

Run unit tests:

npm test

Compile and launch:

npm start

Browse to React webapp:

React Starter Kit and React Static Boilerplate:

http://<virtual machine ip>:3000/
http://<virtual machine ip>:3001/

About

Dockerfile for Yeoman with ReactJS generators

https://hub.docker.com/r/alexagency/react-yeoman/