Skip to content

Instantly share code, notes, and snippets.

@macorifice
Created March 11, 2021 16:48
Show Gist options
  • Save macorifice/75aba82fbf9dd86fefb43154a8ab9ff2 to your computer and use it in GitHub Desktop.
Save macorifice/75aba82fbf9dd86fefb43154a8ab9ff2 to your computer and use it in GitHub Desktop.
version: '3.7'
services:
react:
container_name: react
build:
context: .
dockerfile: Dockerfile
volumes:
- '.:/app'
- '/app/node_modules'
ports:
- 3000:3000
environment:
- CHOKIDAR_USEPOLLING=true
FROM node:13.12.0-alpine
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
RUN npm install --silent
RUN npm install react-scripts@3.4.1 -g --silent
COPY . ./
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment