Good afternoon colleagues, I'm working with Docker in the construction of some images and I've found that some facilities ask the user questions such as a password.
There is the possibility of questioning the user during the process of creating the image and then passing that passage for another command, for example this code sends me an error
FROM ubuntu:16.04
SHELL ["/bin/bash", "-c"]
RUN ["echo","========== Enter root password for db =========="]
RUN ["/bin/bash","read","pass"] > Error al momento de compilar
RUN debconf-set-selections <<< "mysql-server mysql-server/root_password password $pass"
RUN debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $pass"
The error message is as follows:
The command '/bin/bash read pass' returned a non-zero code: 127