On Fri, 29 Jan 2016 15:09, reynierpm at gmail.com <reynierpm at ...> wrote: > > I am working in a Dockerfile but there is a "secure" MariaDB server script > I need to run which is interactive and I don't know how to deal with this. > > Basically this is the flow I have follow on the script at test environment > and is the same I want to achieve in the Dockerfile without user > interaction by just answering as you seen on the flow below: > > # /usr/bin/mysql_secure_installation [snip] > > So I need to write a bash script or something else that could handle this > automatically but has not idea, how would you take care of this? You have a urgend need to re-invent the wheel, no? Have a look at the offical mariab image Dockerfile, be aware that it was written with debian:latest as base: https://github.com/docker-library/mariadb/blob/master/Dockerfile.template or, be even more clever and look at the centos/mariadb image: https://hub.docker.com/r/centos/mariadb/ https://github.com/CentOS/CentOS-Dockerfiles/tree/master/mariadb/centos7 I hope this gives you some pointers to avoid wasting time, but, each to their own, find your pesonal way. Have a nice weekend. - Yamaban.