Node-Red Build your own Docker i

2022-12-20  本文已影响0人  Songzh

Build your own Docker image

The docker-custom directory contains files you need to build your own images.

The follow steps describe in short which steps to take to build your own images.

1. git clone

Clone the Node-RED Docker project from github

git clone https://github.com/node-red/node-red-docker.git

Change dir to docker-custom

cd node-red-docker/docker-custom

1. package.json

2. flows.json

3. docker-alpine.sh, docker-debian.sh

The docker-alpine.sh and docker-debian.sh are helper scripts to build a custom Node-RED docker image. The docker-alpine script is based on Alpine as per the default docker package. The docker-debian is based on debian that may be more familiar to users and may support extra customisation more easily.

Change the build arguments as needed:

4. Run docker-alpine.sh or docker-debian.sh

Run docker-alpine.sh or docker-debian.sh

$ ./docker-alpine.sh

This starts building your custom image and might take a while depending on the system you are running on.

When building is done you can run the custom image by the following command:

$ docker run -it -p1880:1880 -v node_red_data:/data --name myNRtest testing:node-red-build

With the following command you can verify your docker image:

$ docker inspect testing:node-red-build

5. Advanced Configuration

The relevant Dockerfile can be modified as required. Examples of how to extend Dockerfiles to add prerequisite libraries can be found here.

问题

ssh-keyscan failed, no more retries left
解决方法:
删除 know_host.sh 中的

ssh-keyscan -p 2022 ${hosts_2022} >> ${known_hosts_file}
256 SHA256:AGvEpqYNMqsRNIviwyk4J4HM0lEylomDBKOWZsBn434 [source.developers.google.com]:2022 (ECDSA)
上一篇 下一篇

猜你喜欢

热点阅读