Using this image is easier than installing CNCjs on bare-metal Raspberry Pi.
I run CNCjs as a service using systemd so that CNCjs starts automatically on boot. See below for the simple service file.
The following command line can be used to launch the container when not running as a service. I map port 80 to the container because I have a dedicated Raspberry Pi for CNCjs and don't run anything else on it. I map a folder to /cncjs in the container, though that doesn't do much in normal usage, but in can be useful if you run a shell CLI in the container.
docker run --privileged --rm --detach --volume /home/pi/Desktop:/cncjs --publish 80:8000 scotthz/cncjs:latest
FROM resin/raspberrypi3-node:latest
MAINTAINER https://hub.docker.com/u/scotthz/
RUN npm install -g cncjs@latest --unsafe-perm
CMD ["/usr/local/bin/cncjs"]
/etc/systemd/system/cncjs.service.Description=CNC.js service
After=docker.service
[Service]
ExecStart=/usr/bin/docker run --privileged --rm --detach --volume /home/pi/Desktop/cncjs:/cncjs --publish 80:8000 cncjs:latest
[Install]
WantedBy=multi-user.target
Alias=cncjs.service
systemctl enable cncjs
systemctl start cncjs
Content type
Image
Digest
Size
230.8 MB
Last updated
about 8 years ago
docker pull scotthz/cncjs