I still have a hard time understanding how resin.io works in detail for my devices. I still cannot understand how my device knows which script to start when it boots.
I use this script: resin-wifi-connect (which does not work for me:( on RPi3).
ENV INITSYSTEM on RUN apt-get update \ && apt-get install -y dnsmasq \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /usr/src/app/ WORKDIR /usr/src/app RUN curl https://api.github.com/repos/resin-io/resin-wifi-connect/releases/latest -s \ | grep -hoP 'browser_download_url": "\K.*%%RESIN_ARCH%%\.tar\.gz' \ | xargs -n1 curl -Ls \ | tar -xvz -C /usr/src/app/ COPY start . CMD ["bash", "start"]
I understand that I push the cloned files to my resin repo and it gets built by some virtual emulator, so everything is faster. Then I use ethernet to provision my device. That means this built image gets downloaded on my rpi3 right?
Next step, my question is does that mean, CMD COPY apt-get update and all these commands are executed each time, when the device reboots? Or does the Rpi3 “know” he as already got a finished built and just has to execute CMD start. How can one check against /data volume persistent files? Do they get overwritten?
Thank you very much.