• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Launching multi-containers at a time - Docker stacks
"A tool for defining and running multi-container Docker applications", says the Docker Compose definition and yes it is indeed a second tool named "docker-compose" that needs to be installed next to "docker" tool to participate from deploying multiple containers at a time. On native machines it is no problem to post install docker-compose but on netPI it is not there.

But the good thing is deploying a stack of applications at a time is supported by netPI as well using the "stacks" feature of standard Docker. Lean more here about the difference between stacking and composing.

To use the stacks function on netPI open the Docker web GUI portainer.io and then click the menu item "Stacks". Click "+Add stack" and check the "Web editor" feature in the middle and copy and paste the content of your compose YAML file into the web editor frame. Finally click "Deploy the stack".

Since Docker compose often starts many containers at a time you have to patiently wait for downloading the container images the first time you use this function.

Here is how a typical compose file content looks like:

version: "2"
   image: hilschernetpi/netpi-codesys-basis:1.0.1
   network_mode: "host"
   restart: always
     - "/dev/vcio:/dev/vcio"
   privileged: true
   image: nodered/node-red-docker:0.20.8-rpi
     - "1880:1880"
     - bridgeNetwork
   restart: always
   user: root
   image: influxdb:1.7.8
   restart: always
     - "8086:8086"
     - bridgeNetwork
     - INFLUXDB_DB=db0
     - INFLUXDB_USER=user
   image: grafana/grafana:5.4.3
   restart: always
     - "3000:3000"
     - bridgeNetwork
       driver: bridge
           driver: default
               - subnet:
The example above configures and starts 4 containers in a single step:
  • Grafana graphical tool
  • Node-RED IoT tool
  • InfluxDB database
netPI at the moment supports the compose file reference version 2.x. Find here the compose file reference. The version is usually the first statement in a compose file.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Possibly Related Threads…
Thread Author Replies Views Last Post
  Docker amd64 instead of arm biancode 3 85 January-17th-2021, 09:40 PM
Last Post: Armin@netPI
  docker.service start failed EUROKEY 13 1,020 January-17th-2021, 07:52 PM
Last Post: Armin@netPI
  Docker cannot find image COswald 16 1,108 May-18th-2020, 07:15 AM
Last Post: COswald
  After „Rebuild“ of Docker neither the node-RED nor the dashboard can be accessed MAK 4 812 January-31st-2020, 02:14 PM
Last Post: MAK
  Web browser reports "insecure connection" when accessing netPI for the first time Armin@netPI 2 399 January-31st-2020, 07:07 AM
Last Post: Armin@netPI
  Profinet Startup Time Schranz 3 556 November-18th-2019, 03:22 PM
Last Post: Armin@netPI
  [SOLVED] Docker GUI login issue MGharat 1 478 September-19th-2019, 11:50 AM
Last Post: Armin@netPI
Information netPI Docker REST API patrick 1 608 July-16th-2019, 02:45 PM
Last Post: patrick
  Using Windows Containers a.w.d.m. 3 428 July-16th-2019, 01:46 PM
Last Post: patrick
  [SOLVED] Pull Docker Image a.w.d.m. 8 723 July-8th-2019, 11:17 AM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)