Problems after installing docker

i had to re-install my suse linux tumbleweed system, after a meltdown.

i had to re-install docker as well and am now having difficulty getting it running. I’m completely lost and out of my depth, if any one can help:

i think i’ve installed docker engine (to give a cli interface), and i’ve installed docker-compose.

one problem is that docker commands seem to need root to run, and i’d like to run it as a non root user. e.g. docker ps for a user gives

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json”: dial unix /var/run/docker.sock: connect: permission denied

anyway, if i run ‘su’ to go into su mode and try docker ps i then get

docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I have no idea how to get docker deamon running, or check if it is - i think this is then giving me problems further down the line when i try a docker-compose up.

localhost:/home/ruth/software/OpenEMR/openemr/docker/development-easy # docker-compose up
ERROR: Couldn’t connect to Docker daemon at http+docker://localhost - is it running?

If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

if anyone can give me guidance, i’d appreciate it, meanwhile i’ll keep trying to read the docker documentation etc. thanks.

Hi Ruth,

It sounds like you’re encountering some issues with Docker on your re-installed SUSE Linux Tumbleweed system. Let’s go through the steps to address these problems:

  1. Permission Denied Issue: The “permission denied” error you’re seeing when running Docker commands as a non-root user is because Docker typically requires root privileges. However, you can grant your user access to Docker without using the root user by adding your user to the “docker” group. To do this, run the following command as the root user:
sudo usermod -aG docker your_username

Replace your_username with your actual username. After running this command, you will need to log out and log back in for the group changes to take effect.

  1. Docker Daemon Issue: The Docker daemon should start automatically when your system boots up. To check if it’s running, you can use the following command:
sudo systemctl status docker

If it’s not running, you can start it with:

sudo systemctl start docker

Additionally, you can enable Docker to start on boot with:

sudo systemctl enable docker

After starting the Docker daemon, you should be able to use Docker commands without issues.

  1. Docker Compose Issue: The error you’re getting with docker-compose up could be related to the Docker daemon not running or a misconfiguration in your Docker Compose file. Ensure that the Docker daemon is running as mentioned in step 2.If you still encounter issues, double-check your Docker Compose configuration files for any errors. It’s also a good idea to navigate to the directory containing your Docker Compose file before running the docker-compose up command.

Once you’ve followed these steps, you should be able to run Docker and Docker Compose as a non-root user on your system. If you encounter any more issues or have specific questions, please feel free to ask for further assistance. Good luck with your Docker setup!

3 Likes

thank you thep, i really appreciate your help.

the group is called ‘dockremap’ on my system - making my user part of this group allowed me to run docker commands :slight_smile:
and I did get the daemon running :slight_smile: , so onto the next problem for compose. i go into the directory openemr/docker/development-easy which contains the compose file, (and this is the latest version), run docker-compose up, and now get problems with mysql:

ruth@localhost:~/software/OpenEMR/openemr/docker/development-easy> docker-compose up
Pulling mysql (mariadb:10.11)…
ERROR: Get “https://registry-1.docker.io/v2/library/mariadb/manifests/sha256:3e8f15fd6328340f4024fcb7005cce0da1fa5065554b7c420626f803b67ddc12”: dial tcp [2600:1f18:2148:bc02:4bf0:3a98:55ae:e3d5]:443: connect: network is unreachable

this feels maybe like a permissions thing? any way it’s getting late here in london, so let me have another go at trying to solve this tomorrow and get back to you if i still need help - although if you have a quick solution for the mariadb problem i’d be really grateful!! again thanks.

1 Like

You’re welcome, Ruth!

It’s great to hear that you made progress with Docker and the Docker daemon. Now, let’s address your issue with MySQL and Docker Compose.

The error message you’re encountering, “network is unreachable,” suggests that Docker is having trouble connecting to the Docker Hub registry to pull the MariaDB image. This is usually unrelated to permissions but can be caused by network or DNS issues.

Here are some steps to troubleshoot the issue:

  1. Check Your Network Connection: Ensure that your internet connection is working correctly. You can try pinging Google or another reliable website to test network connectivity, You can use the following command to ping Google:
ping google.com

If the ping is successful, your network is fine. If not, you might have network connectivity issues.

  1. DNS Configuration: I suspect there maybe DNS issues, you can check your DNS configuration. You can do this by inspecting your /etc/resolv.conf file:
cat /etc/resolv.conf

Ensure that it contains valid DNS server IP addresses. If it doesn’t, you may need to update your DNS settings.

  1. Proxy Settings: I don’t think this is the case but worth noting If you are behind a proxy, Docker might not be configured to work with it. You can configure Docker to use a proxy by creating or editing the Docker daemon configuration file (/etc/docker/daemon.json) and adding proxy settings. Here’s an example:
{
  "proxies": {
    "default": {
      "httpProxy": "http://your-proxy-server:port",
      "httpsProxy": "http://your-proxy-server:port",
      "noProxy": "localhost,127.0.0.1"
    }
  }
}

Replace "http://your-proxy-server:port" with your actual proxy server details.

After checking these aspects, if you’re still facing issues, please feel free to return for further assistance. Having a working MariaDB image for your Docker Compose setup is important for openemr, and we’ll be here to help you resolve it. Good luck with your troubleshooting!

3 Likes

hi thep,
i’ve had a rather busy day with non computer work, so haven’t got very far but found that i have internet connection ok (e.g. ping hp.com successfully), /etc/resolv.conf contains only one name server line

nameserver 192.168.1.1

this is the ip address of my router, to which the desk top is connected via cable. The router is then configured to use the DNS of my ISP (i have that IP addr), so i guess is acting as a proxy. So right now i’m trying to get round this - either treat that IP address as a proxy (e.g. in the way you suggested etc ), or add in the external ip address as a nameserver. No joy so far, but have some things to try. I have a clear day to work on this tomorrow. so :crossed_fingers:

Try changing the nameserver to 8.8.8.8 and see if that does anything. :thinking:

3 Likes

omg - that worked!! mysql is loading… and now my openemr server is up and running again !! thank you so so much!

I looked 8.8.8.8 up to see what kind of magic that is and discovered it’s google’s public DNS server - interesting! - i might play around a bit tomorrow to see if i can use Zen’s (my ISP) instead, but great to know 8.8.8.8 is there if i need it.

1 Like

Glad it’s working! :smile:

1 Like