February-21st-2023, 01:52 PM
There are two methods to start a docker container. Both methods are 100% equal, just the way is different
Method 1: calling "docker" command line e.g "docker run <parameter1> <parameter2> <parameter3> <parameter4> ... <Container>"
Methog 2: calling "docker-compose" command line e.g "docker-compose <compose-file> up"
So instead of having a very very very long and anoying "docker run ...." command line using docker-compose is much more easier since all required parameters are inserted in a simple text file socalled docker-compose.yml file
But the most important point is: either the one or the other method starts the container exactly in the same way. So there will never be a different in the behavior of the container afterwards
You are asking about a docker-compose file. How to create own docker-compose files can be found in the very official specification. https://docs.docker.com/compose/compose-file/
For Node-RED there are also proposals of a compose file available on the official Node-RED homepage on https://nodered.org/docs/getting-started/docker. There is a chapter named "Docker Stack / Docker Compose" and there you find an example of a typical Node-RED docker-compose.yml file. You can copy and paste the contents to a physical file on your Linux and call it.
Method 1: calling "docker" command line e.g "docker run <parameter1> <parameter2> <parameter3> <parameter4> ... <Container>"
Methog 2: calling "docker-compose" command line e.g "docker-compose <compose-file> up"
So instead of having a very very very long and anoying "docker run ...." command line using docker-compose is much more easier since all required parameters are inserted in a simple text file socalled docker-compose.yml file
But the most important point is: either the one or the other method starts the container exactly in the same way. So there will never be a different in the behavior of the container afterwards
You are asking about a docker-compose file. How to create own docker-compose files can be found in the very official specification. https://docs.docker.com/compose/compose-file/
For Node-RED there are also proposals of a compose file available on the official Node-RED homepage on https://nodered.org/docs/getting-started/docker. There is a chapter named "Docker Stack / Docker Compose" and there you find an example of a typical Node-RED docker-compose.yml file. You can copy and paste the contents to a physical file on your Linux and call it.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)