Getting ssh-keygen in Alpine docker
Asked Answered
B

1

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?

Blocking answered 23/3, 2018 at 22:25 Comment(6)
The package name openssh-keygen is right. What does which ssh-keygen say inside the container? For me, it says /usr/bin/ssh-keygen.Dare
Nothing return.... Do you bring the package in similar way? Let me then check my setup again...Waadt
Look at this pastebin - pastebin.com/ascreDGADare
Hi @prasadk, if you do have time, could you look into my Dockerfile? pastebinWaadt
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.Dare
Thank you! Dis you also 1st create a container from it, then logged into container to see if ssh-keygen is their?Waadt
B
21

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
......
Blocking answered 25/3, 2018 at 21:53 Comment(1)
RUN apk add --no-cache --update openssh-keygen # in shortPalladino

© 2022 - 2024 — McMap. All rights reserved.