React Hooks app to calculate the BMI of a person. It can store the data for 7 days with the help of LocalStorage.
Created with create-react-app. See the full create-react-app guide.
npm install
npm start
- Removing the dependency of Materialize-CSS module
2. Chart going crazy on hovering over the old points
We could use a multi-stage Dockerfile to first build the app inside Docker, then copy the build to an Nginx image.
But since we do the build in a Jenkins pipeline, it is ready to copy directly to an Nginx image.
yarn build
docker build \
--label org.label-schema.name=bhubr/bmi-calculator \
--label org.label-schema.build-date=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--label org.label-schema.version=0.1 \
-t bhubr/bmi-calculator:0.1 .
docker run -p 8000:80 -d yourusername/bmi-calculator:0.1