Home > Mobile >  apt-get: command not found in mysql docker CLI
apt-get: command not found in mysql docker CLI

Time:07-21

as a first... yes...yes I know there are 1000 questions and solutions to this. But unfortunately none of them helps me.

Let's get to the problem:

I have a Docker container running on which MySQL is configured. Now I would like to change the bind address from 127.0.0.1 to 0.0.0.0. Unfortunately I can't open my.cnf because I don't have nano, vim installed. With apk, yum, vim, apt-get and so on I get that:

apt-get: command not found
apk: command not found
...

Could someone of you maybe help me out with my little problem? best thanks and greetings

CodePudding user response:

You could do a docker cp to copy the file out of the container, edit it, and then docker cp it back in again. This may be fine if you need to do this for troubleshooting, but you probably want to look at fixing this in your deployment process. You should be able to destroy and re-create the docker container without having to manually fix configurations. This should be handled in your Dockerfile, or perhaps copying the correct configuration file in in your docker compose file.

  • Related