GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - coffezilla/docker-react: Docker ReactJS + Node

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
react-app
react-app
 
 
.DS_Store
.DS_Store
 
 
.dockerignore
.dockerignore
 
 
.env
.env
 
 
.gitattributes
.gitattributes
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 

Repository files navigation

Docker React

This docker React example is used to create a container running node for React projects. All the React content runs in the host side, the container is used only to run the application inside the node enviroment, so, this way you don't need to install node versions in the host.

How to use

  • After clone this repo, use the terminal and navigate to the 'react-app' folder
  • Inside the 'react-app' folder, use 'npm install' to install all the dependencies
  • Use 'docker-compose up' to start the container running your app

Tips

  • Edit .env file in order to change the name of the container and change the default (3000) port
  • You need to change the CONTAINER_PREFIX and APP_PORT inside the .env file in order to create many containers

How to use Docker with a React already created

To use this Dockerfile and docker-compose.yml in a project already created (using create-react-app), just copy the Dockerfile and docker-compose.yml and put them in the root of your react app.

After that, just call the 'docker-compose up' and it will just start the container for you.

Why node alpine version?

The node tagged with alpine is lightweight than default node. the alpine is secure and has all you need to run a simple react app.

If you want to use the node default, it will be weight but it allow you to use bash: docker run -it --entrypoint /bin/bash my_node_image

About

Docker ReactJS + Node

Topics

dockerdocker-composedocker-nodedocker-react

Resources

Readme
Activity

Stars

10 stars

Watchers

2 watching

Forks

9 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.