Build the image with multi-stage
docker build -t aduyng/home-automation-dashboard:latest .
Run the ngnix image
docker run -p 8080:80 aduyng/home-automation-dashboard:latest
- build the app
npm run build
- copy to the target raspberry pi
scp -r build pi@192.168.86.7:/home/pi/Downloads/
- ssh into pi and move the file to document root of nginx
ssh pi@192.168.86.7 sudo rm -rf /var/www/html/* sudo mv /home/pi/Downloads/build/* /var/www/html/
- reboot the pi
sudo reboot