Excellent image! However I am having trouble exporting data from the instance without errors. I run my export like this:
docker run -it --link containername:mysql --rm mysql sh -c 'exec mysqldump -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" dbname' | gz > output.sql.gz
However, this results in the warning:
"mysqldump: [Warning] Using a password on the command line interface can be insecure."
As the first line of the outputted file.
Is there any way to suppress this warning from the mysqldump client?
Sorry for the massive delay! If you're piping output to another program, you want to avoid using the -t flag for docker run (or docker exec). Having Docker create a TTY can interfere with the output you're trying to capture. I imagine that if you remove the -t, then the warning you're talking about will be on standard error (instead of standard out) as is appropriate, and will thus not be included in the output captured by gz. :+1:
Most helpful comment
Sorry for the massive delay! If you're piping output to another program, you want to avoid using the
-tflag fordocker run(ordocker exec). Having Docker create a TTY can interfere with the output you're trying to capture. I imagine that if you remove the-t, then the warning you're talking about will be on standard error (instead of standard out) as is appropriate, and will thus not be included in the output captured bygz. :+1: