I'm trying to set a root password for a mysql database in a Dockerfile like this:

(short version)
ENV DEBIAN_FRONTEND noninteractive
RUN echo mysql-community-server mysql-community-server/root-pass password 'mypassword' | debconf-set-selections && \
echo mysql-community-server mysql-community-server/re-root-pass password 'mypassword' | debconf-set-selections
RUN apt-get install mysql-server...

When I try to do it in a KVM it works perfectly, but somehow my root password is not accepted in the docker conainer - in the log files I see, that an empty root password has been set. I also tried without the ENV DEBIAN_FRONTEND noninteractive. Does anyone has an idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.