• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Building Custom Images for Netpi
#1
Dear All,

I read somewhere that it is not possible to perform docker commands like build,run etc from ntepi's command line. Is it true? If true, then how can we build custom images for netpi.  If we need to build an image using a Rpi 3 and later how can we pull that image into netpi and start a container. I will be grateful if someone can help me with a link or file that can guide me through this process. Thank You very much.
  Reply
#2
Dear Rahulsagar,

the story about netPI is special ... we tell customer indeed to collect experience with Docker and building own containers and starting/testing the software on a standard Rpi3 (at $30cost) and then if all the software has been passed the tests to buy a professional netPI afterwards which is a Docker Host only and not development platform to run the software securely. So it is a fair offer to have a Rpi3 as development platform and a netPI for a software deploy later, don't you think.

Now back to your question how to develop containers for netPI. First rule: for pulling images from somewhere you need in all cases a registry server.

1. First method is to host your container on Docker hub registry server ... like we as Hilscher do it with all the example containers like the HDMI for example. You can create an own repository in minutes there. If you like you can link the repository to a github source pool containing the Docker buildscript "Dockerfile" and then Docker hub is able to build a container directly on the web automated. Of course this makes all the sources open and is not always what is intended

2. Second method is creating an own trusted registry server locally on a Linux machine. How to do that is described here: https://docs.docker.com/registry/deploying/. You can also host a registry server on a Raspberry Pi ... how to do that is described in the forum here step by step: https://forum.hilscher.com/thread-291.html.

So a Rpi can be the development platform and a registry server all in one device. Once you have a registry server running on a Rpi you can just call "docker push" to push your container on the same machine you developed it on and then netPI is able to pull it from there. On latest software version of netPI you can directly setup registries in terms of ip address, names and password if required next of the default registry "DockerHub". For a trusted Registry it is necessary to install the certificates on netPI, else netPI will not pull anything.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
(December-15th-2018, 08:14 AM)Armin@netPI Wrote: Dear Rahulsagar,

the story about netPI is special ... we tell customer indeed to collect experience with Docker and building own containers and starting/testing the software on a standard Rpi3 (at $30cost) and then if all the software has been passed the tests to buy a professional netPI afterwards which is a Docker Host only and not development platform to run the software securely. So it is a fair offer to have a Rpi3 as development platform and a netPI for a software deploy later, don't you think.

Now back to your question how to develop containers for netPI. First rule: for pulling images from somewhere you need in all cases a registry server.

1. First method is to host your container on Docker hub registry server ... like we as Hilscher do it with all the example containers like the HDMI for example. You can create an own repository in minutes there. If you like you can link the repository to a github source pool containing the Docker buildscript "Dockerfile" and then Docker hub is able to build a container directly on the web automated. Of course this makes all the sources open and is not always what is intended

2. Second method is creating an own trusted registry server locally on a Linux machine. How to do that is described here: https://docs.docker.com/registry/deploying/. You can also host a registry server on a Raspberry Pi ... how to do that is described in the forum here step by step: https://forum.hilscher.com/thread-291.html.

So a Rpi can be the development platform and a registry server all in one device. Once you have a registry server running on a Rpi you can just call "docker push" to push your container on the same machine you developed it on and then netPI is able to pull it from there. On latest software version of netPI you can directly setup registries in terms of ip address, names and password if required next of the default registry "DockerHub". For a trusted Registry it is necessary to install the certificates on netPI, else netPI will not pull anything.

Thx
Armin

Dear Sir,

Thank You for the response and I will try as you suggested..Thanks for the supporting links....
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] node-red Dashboard Docker Image for netPI? anrodriguez 1 18 February-7th-2019, 05:35 PM
Last Post: Armin@netPI
  Multi-stage builds for slim container images Armin@netPI 0 4 February-7th-2019, 04:14 PM
Last Post: Armin@netPI
  [SOLVED] NetPI storage FULL flaminid 3 119 October-29th-2018, 08:05 PM
Last Post: Armin@netPI
  Push / Get Images from NetPi Jonas.Sellmann@outlook.de 5 185 August-14th-2018, 02:00 PM
Last Post: Armin@netPI
  [SOLVED] hilschernetpi/netpi-nodered-fieldbus Fieldbus configurator can't be open Andreas 6 192 June-11th-2018, 09:12 AM
Last Post: Armin@netPI
  Loading times for images from Docker Hub Armin@netPI 0 102 December-3rd-2017, 01:47 PM
Last Post: Armin@netPI
  Build automated images on Docker Hub Armin@netPI 0 93 November-23rd-2017, 07:32 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)