Industrialized Raspberry Pi for Custom Automation Projects
For platform details read on here.
The image - Raspbian OS with containerized Docker for on-board container developments
Base of this image builds a tagged version of debian:jessie with enabled SSH, created user 'pi' and installed Docker enabling the use of Docker's command line interface Docker CLI to take control of netPI's top-level Docker from inside the container.
For remote login to the container across SSH the container's SSH port
22 needs to be mapped to any free netPI host port.
To redirect Docker commands called in the container to netPI's top-level Docker its deamon socket
/var/run/docker.sock needs to be mounted into the container.
STEP 1. Open netPI's landing page under
https://<netpi's ip address>.
STEP 2. Click the Docker tile to open the Portainer.io Docker management user interface.
STEP 3. Enter the following parameters under Containers > Add Container
Host "22" (any unused one) -> Container "22"
Restart policy" :
Advanced container settings > Volumes > map additional volume:
Container: /var/run/docker.sock, Bind -> Host: /var/run/docker.sock
STEP 4. Press the button Actions > Start container
Pulling the image from Docker Hub may take up to 5 minutes.
After the container has been started login to it with a SSH client such as putty using the netPI's IP address along with the mapped SSH port. Use the credentials
pi as user and
raspberry as password when asked and you are logged in as a non-root user
The container will direct any of your Docker CLI calls in the format 'docker [OPTIONS] COMMAND [ARG...]' to netPIs top-level Docker with immediate effect. It provides you an alternative path in pushing and pulling netPI containers and even better to build and develop containers on-board. Every command requires to preface it with
sudo. Tip: call
sudo -i once before using the Docker CLI to create a new root login shell.