Combine Create React App with Typescript and Eslint
- Typesafe
- Supports unit testing
- Storybook
- Eslint, Husky
- Absolute path 🔥
- PWA with Workbox
sudo docker build -f Dockerfile -t client .
The above command will create an image called client on Docker. To test it, we will create a container that will help us run this image. Port Forwarding to 3000, mount
sudo docker run --rm -it --name reduxblog -p 3000:3000 -v $(pwd):/app client
FROM node:alpine as build
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --production
COPY . .
RUN npm run build
FROM nginx:1.12-alpine as prod
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
sudo docker build -f Dockerfile -t client-prod .
sudo docker run --rm -it --name reduxblog -p 3000:80 client-prod