React environment construction with Docker


What you can do Open React page using Docker


FROM node:14.13.1 
WORKDIR /usr/src/app/


version: '3'
      context: .
    tty: true
      - NODE_ENV=development
    - ./:/usr/src/app
    command: sh -c "cd reactapp && npm start"
    - "3000:3000"

Execute docker command in the directory where docker-compose.yml is located

docker-compose build

Create react app

docker-compose run --rm node sh -c "npm install -g create-react-app && create-react-app reactapp"

launch react app

docker-compose up

Success if you can access it on localhost: 3000!

Personal notes Enter the container docker exec -it container name bash Install react-router npm install -S react-router-dom install material-ui npm install @material-ui/core

Recommended Posts

React environment construction with Docker
[Docker] Rails 5.2 environment construction with docker
React + Django + Nginx + MySQL environment construction with Docker
Docker environment construction
Rails + MySQL environment construction with Docker
[Environment construction with Docker] Rails 6 & MySQL 8
GPU environment construction with Docker [October 2020 version]
Rails environment construction with Docker (personal apocalypse)
Rails Docker environment construction
Laravel development environment construction with Docker (Mac)
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
Laravel + MySQL + phpMyadmin environment construction with Docker
Rails6 [API mode] + MySQL5.7 environment construction with Docker
React Native (TypeScript) + Expo project construction with Docker
Wordpress local environment construction & development procedure with Docker
Pytorch execution environment with Docker
MySQL 5.7 (Docker) environment construction memo
Redmine (Docker) environment construction memo
Build docker environment with WSL
Docker × Spring Boot environment construction
Database environment construction with Docker in Spring boot (IntellJ)
Create a Vue3 environment with Docker!
Build Couchbase local environment with Docker
Build a Node.js environment with Docker
Build environment with vue.js + rails + docker
Build Rails environment with Docker Compose
Create SolrCloud verification environment with Docker
Rails on Docker environment construction procedure
Create Laravel environment with Docker (docker-compose)
Build docker + laravel environment with laradock
Easy environment construction of MySQL and Redis with Docker and Alfred
[Portfolio] Manage site with laravel APP implementation (Docker environment construction)
Case that gave up environment construction of react with ubuntu
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
Alert slack with alert manager in Docker environment
SQL statement learning ~ Environment construction ~ Docker + MySQL
Building Rails 6 and PostgreSQL environment with Docker
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Sapper × Go (echo) × Docker development environment construction
Build a PureScript development environment with Docker
[Java] Environment construction
Create Rails 6 + MySQL environment with Docker compose
Edit Mysql with commands in Docker environment
Create a MySQL environment with Docker from 0-> 1
Java environment construction
Create Spring Boot-gradle-mysql development environment with Docker
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
[Docker] Create Node.js + express + webpack environment with Docker
Spring Boot + Docker Java development environment construction
PostgreSQL environment construction with Docker (from setup to just before development)
Build a Wordpress development environment with Docker
[Spring] Environment construction
[Docker] Build Jupyter Lab execution environment with Docker
"Rails 6 x MySQL 8" Docker environment construction procedure for sharing with teams
Build an environment with Docker on AWS
Lightweight PHP 7.4 development environment created with Docker
Build TensorFlow operation check environment with Docker
Environment construction summary with rvm and postgresql
How to build Rails 6 environment with Docker
Introduction to Robot Battle with Robocode (Environment Construction)
Docker + DynamoDB local + C ++ environment construction and practice