Hello balena gurus,
I’m working on a “quick” security camera with Raspberry Pi 3 and/or Pi Zero Wireless. Captured images will be temporarily stored in RAM and qualified before writing to SSD. The intent to not burn out the micro-sd card with lots of image writes while checking for image changes (saving the ones that detect motion).
How would I accomplish this with balena.io? In the past, I think I followed this quick guide:
sudo mkdir /var/tmp sudo nano /etc/fstab # add: tmpfs /var/tmp tmpfs nodev,nosuid,size=64M 0 0 sudo mount -a
Here’s where I’m at so far in the Dockerfile.template (just getting started):
FROM balenalib/%%BALENA_MACHINE_NAME%%-node RUN apt-get -q update && \ apt-get install -yq --no-install-recommends build-essential libraspberrypi-bin \ apt-get clean # Hmmm where to start with new tmp RAM drive... COPY package.json /package.json RUN npm install COPY src/ /usr/src/app CMD ["node", "/usr/src/app/index.js"]
Thanks for taking a look in advance!