I build container from below Dockerfile:
FROM ubuntu:14.04 ... RUN apt-get update && apt-get install -y vim #RUN ssh-keygen -f /root/.ssh/id_rsa -N strongpass123$%^ RUN ssh-keygen -f /root/.ssh/id_rsa ...
I do it quite rarely, but there is many command before using of
ssh-keygen and after it.
I know that I can do it from script through
docker exec -it thirsty_darwin sh script.sh and then tag image and then use chaining of containers (images), but it is not as clear solution as I want.
Even worst case is with
ssh-add ~/.ssh/id_rsa when I have to use expect tool. Expect tool has hardcoded my password. I do not want to do it.