Unable to upload image with systemctl command


When I add the following lines in the docker.template file,

COPY mnt-storage.mount /etc/systemd/system/
RUN systemctl enable mnt-storage.mount

I want to create a mount point to mount an external USB drive in Raspberry pi.
However, I am getting this error,

Can anybody help me?


Looks to me that you do not have systemd installed in the container. In general you do not need systemd to mount external USB drives you could just follow the steps described here: https://www.balena.io/docs/learn/develop/runtime/#mounting-external-storage-media.
But if you do want to go the systemd path you can follow these instruction for installing systemd in your container: https://www.balena.io/docs/reference/base-images/base-images/#installing-your-own-initsystem
Kind regards,