• 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 to run the software securely and not a development platform. So it is a fair offer to have a standard Rpi3 as development platform and then a netPI for the software deployment 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
  Exporting and importing container images Armin@netPI 3 3,062 May-20th-2020, 11:24 AM
Last Post: COswald
  [SOLVED] netPI with Raspbian Desktop firefly 8 5,654 November-28th-2019, 06:01 PM
Last Post: Armin@netPI
  [SOLVED] Help with fieldbus node Farani 5 3,873 August-20th-2019, 07:22 AM
Last Post: Armin@netPI
  [SOLVED] How to update firmware philippbruhin.ch 12 9,081 July-16th-2019, 11:20 AM
Last Post: patrick
  [SOLVED] Docker issues AlexRegev 7 5,101 June-26th-2019, 02:14 PM
Last Post: AlexRegev
  [SOLVED] netPI stops working (502 - Bad Gateway) Andi 3 3,503 June-19th-2019, 03:58 PM
Last Post: Andi
  [SOLVED] WebConfig netpi-nodered-fieldbus JohnyD94 13 7,867 May-6th-2019, 12:20 AM
Last Post: JohnyD94
  [SOLVED] Diagnostic service MGharat 1 1,905 April-2nd-2019, 09:45 PM
Last Post: Armin@netPI
  [SOLVED] NPIX-DIDO MGharat 2 5,901 March-13th-2019, 06:06 AM
Last Post: MGharat
  [SOLVED] node-red Dashboard Docker Image for netPI? anrodriguez 1 2,903 February-7th-2019, 05:35 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)