Todo App

Dockerfile
# Dockerfile
FROM "node:14.5.0-alpine3.10"
ENV http_proxy=http://proxy.srv.cc.nttcom.co.jp:8080/
ENV https_proxy=http://proxy.srv.cc.nttcom.co.jp:8080/
ENV no_proxy=localhost,127.0.0.1
WORKDIR /app
docker-compose.yml
docker-compose.yml
version: "2"
 services:
   node:
     build: .
     environment:
       - NODE_ENV=production
     volumes:
       - ./:/app
     ports:
       - "3000:3000"
Docker build and create todo app
#build image
docker-compose build

#Install create-react-app then create todo app
docker-compose run --rm node sh -c "npm i -g create-react-app && create-react-app todo-app"

#Create initial app
docker-compose run --rm node npm init
#Install npm
docker-compose run --rm node npm install

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *