The easiest way to create a React app with server-side rendering thanks to Next.js.
Features: create-next-app, Docker and Yarn.
Running on Linux? Optional step for allowing linux non-root users to run docker commands:
$ sudo usermod -aG docker $USER
Just run:
docker-compose up
And wait until the console returns a ready on https://localhost:3000
- Check your code at
src/
- Open http://localhost:3000
- Hack away!
Run commands into your container without going into, from your host machine:
docker-compose exec hello-docker-react mycommand
Enter into your container to run commands inside it (ssh-like):
docker-compose exec hello-docker-react bash
For advanced usage, follow the docker-compose command-line reference: