• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
netPI Docker REST API
#1
Information 
netPI web GUI portainer.io offers a REST API to control netPI Docker daemon from remote. All that is needed is a HTTPS capable client that is addressing the API function over REST.

To understand how it works I created a new Node-RED (includes a HTTPS client) based flow. It is compatible with netPI software versions greater than >= 1.1.4.0. (for more details click HERE)
The flow includes a login, how to list containers, images, how to pull an image, create a container, start and stop it and ALSO how to push a container from netPI back to Docker registry.

Find appended the Node-RED flow you can test yourself. Open the flow file and copy its content to the clipboard and import it with "import/clipboard" in Node-RED using the top right menu pane. 

For older netPI software versions (< V1.1.4.0) you find the Node-RED flow HERE.


Attached Files
.txt   flow.txt (Size: 24.75 KB / Downloads: 30)
#2
Another new Node-RED flow appended to this new post includes a Docker Stack example now

A stack is a collection of services that make up an application in a specific environment.

Tested with netPI software version V1.2.0.0 .


.txt   flow.txt (Size: 27.71 KB / Downloads: 18)


Possibly Related Threads…
Thread Author Replies Views Last Post
  https certificate issues in new nodered docker image Dipro 1 593 May-4th-2022, 05:46 AM
Last Post: Armin@netPI
  REST API server data communication MGharat 2 1,517 July-21st-2021, 07:01 AM
Last Post: MGharat
  Docker exposed port don't send data on eth0 COswald 3 1,720 July-15th-2021, 02:10 PM
Last Post: Armin@netPI
  Docker not enabled tad 10 2,672 July-14th-2021, 08:54 AM
Last Post: Armin@netPI
  Accessing netPI web UI with REST API Armin@netPI 14 4,652 June-30th-2021, 05:06 AM
Last Post: Armin@netPI
  Docker amd64 instead of arm biancode 3 1,885 January-17th-2021, 09:40 PM
Last Post: Armin@netPI
  docker.service start failed EUROKEY 13 6,229 January-17th-2021, 07:52 PM
Last Post: Armin@netPI
  Get host MAC via REST API inside container bschandra 4 2,409 November-16th-2020, 09:26 AM
Last Post: bschandra
  Docker cannot find image COswald 16 5,969 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 3,052 January-31st-2020, 02:14 PM
Last Post: MAK

Forum Jump:


Users browsing this thread: 1 Guest(s)