10

for node-red new functionality Projects - where one can sync with a git repo, I need ssh-keygen in my Alpine docker Image. According to Alpine Linux packages for v3.6, it is in the openssh-keygen package.
Thus, I added the RUN commands as follows in the Dockerfile, with no luck.

......
RUN   apk update && \
      apk add --no-cache \
      openssh-keygen
......

I then test to see if it gets into the Image, by creating a container from the Image, doing a docker exec -it containername sh and then typing ssh-keygen - but do not find it.
Also not working if I replace openssh-keygen with openssh under the RUN command in the Dockerfile.

Can someone please point me in the right direction?

Jéan
  • 639
  • 4
  • 11
  • 28
  • The package name `openssh-keygen` is right. What does `which ssh-keygen` say inside the container? For me, it says `/usr/bin/ssh-keygen`. – PrasadK Mar 23 '18 at 22:34
  • Nothing return.... Do you bring the package in similar way? Let me then check my setup again... – Jéan Mar 23 '18 at 22:36
  • Look at this pastebin - https://pastebin.com/ascreDGA – PrasadK Mar 23 '18 at 22:38
  • Hi @prasadk, if you do have time, could you look into my Dockerfile? [pastebin](https://pastebin.com/FvD1H3jg) – Jéan Mar 23 '18 at 22:47
  • I don't see any obvious problems with you Dockerfile. I built a docker image using the relevant parts of your Dockerfile and was able to get ssh-keygen installed inside the image. – PrasadK Mar 23 '18 at 23:02
  • Thank you! Dis you also 1st create a container from it, then logged into container to see if ssh-keygen is their? – Jéan Mar 23 '18 at 23:07

1 Answers1

20

Thanks to @PrasadK - which nudged me along, the answer to Node- Red new Projects feature since version 0.18.3 - in order to have a remote repo - using this function in Node-Red Projects, the underlying docker image requires ssh-keygen. Do this in the Dockerfile with:

......
RUN   apk update && \
      apk add --no-cache \
      openssh-keygen
......
Jéan
  • 639
  • 4
  • 11
  • 28