i need deploy to fargate, but nodered rebuild will follow hostname to create flow.json, this make me so hard to load old config to new nodered. But now, if using docker run -h is work,but in fargate dose not work, how can i do?
Of course, release nodered docker version is solved this problem,but i don’t know how to call cli tools,if base on node-red, how can i install aws-cli2 and call it in nodered dashboard?
FROM nodered/node-red:latest
#USER root
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
RUN unzip awscliv2.zip
RUN ./aws/install
CMD ["node-red"]
The correct Dockerfile would be:
FROM nodered/node-red:latest
USER root
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
RUN unzip awscliv2.zip
RUN ./aws/install
RUN rm -rf ./aws
USER node-red
But the problem is that the image is based on Alpine Linux which uses the musl standard libraries instead of glibc. And the AWS tools will not work with this runtime.
The easiest solution will be to use the Debian based build that I mentioned in the first comment. The docker file for that can be found here, follow the instructions there to use the docker-debian.sh
which will create an image called
testing:node-red-build
which you can then use as the base for the Dockerfile I showed earlier:
FROM testing:node-red-build
USER root
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
RUN unzip awscliv2.zip
RUN ./aws/install
RUN rm -rf ./aws
USER node-red