• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Application developed with commercial Raspberry Pi
#2
The procedure is as follows:

1. Install Raspbian OS on your RPi SD card
2. Install Docker on your RPi as described here https://www.raspberrypi.org/blog/docker-...pberry-pi/
3. Now you have two methods to build a container image
  1. Build an image based on a script file named by default Dockerfile. Command reference of Dockerfile is here https://www.raspberrypi.org/blog/docker-...pberry-pi/. Hilscher uses this method always since the script file is constant and the resulting Docker container is always the same. Here is an example of a Dockerfile of HDMI container: https://github.com/HilscherAutomation/ne...Dockerfile
  2. Or you do manually
4. If then finally your container image is ready on your commcercial RPi then you need to make it accessible for other Docker hosts like netPI on a Docker Registry which is more or less just a big database full of containers. You can have
  1. your own registry on a local Linux server (like a commercial Raspberry Pi also) running, so not everybody can access it. I described how to make an own registry server here https://forum.hilscher.com/Thread-Setup-...containers
  2. or you use an Internet Docker Registry like Docker Hub at https://hub.docker.com/. This is how Hilscher is doing it. So create an account there and you can push container images onto Docker Hub for free if they are public. This is how Hilscher is doing it at https://hub.docker.com/u/hilschernetpi repository.
5. Once you uploaded your container on either registry with command "docker push <container-name>" all others that have access to this registry can pull it later from there. So as with the netPI example container images I pushed them all on Docker hub and others like you can pull it from there

I always recommend to use Dockerfile based build process. Once you have the Dockerfile ready just call in this folder "docker build -t thisismyfirstcontainer:1.0 ." to start building process. You can try loading a Dockerfile from the web like this one here https://github.com/HilscherAutomation/ne...Dockerfile and call "docker build -t thisismyfirstcontainer:1.0 ." in the folder you put the Dockerfile to ... and you will see it will build the HDMI image on your original RPi3. if you call "docker images" after the build you will recognize the container image named as "thisismyfirstcontainer:1.0".

The manual way I have described here 4 years ago https://www.netiot.com/netpi/industrial-...pberry-pi/

I also recommend to make a simple test to get familiar with Docker first of all. Deploy a hello-world container first as described here https://iotbytes.wordpress.com/setting-u...container/

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

  Reply


Messages In This Thread
RE: Application developed with commercial Raspberry Pi - by Armin@netPI - June-10th-2020, 07:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Access to RTC from my own container application tad 1 3,632 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  netpi raspberry Hochschulstudent 1 2,405 August-12th-2020, 01:50 PM
Last Post: Armin@netPI
  CODESYS - Control for Raspberry Florian 1 3,875 March-18th-2019, 06:16 PM
Last Post: Armin@netPI
  Setup trusted Docker registry on a Raspberry Pi to host netPI containers Armin@netPI 12 12,845 January-31st-2019, 06:47 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)