Search code examples
dockerriderubuntu-20.04

how to setup Docker for Rider in Linux


I'm running Ubuntu 20.4. and installed Docker by following the steps from the docs https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository .

I installed Rider from Jetbrains Toolbox and want to setup Docker for my project. The Docker plugin is installed by default. I made sure that Docker is running via systemctl status docker.

I followed this guide on how to setup Docker for Rider https://blog.jetbrains.com/dotnet/2018/07/18/debugging-asp-net-core-apps-local-docker-container/ but unfortunately I get this error

Cannot connect: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:2375 caused by: java.net.ConnectException: Connection refused

enter image description here

What is missing or wrong?


Solution

  • In that dialog, check "Unix socket".

    This will contact the Docker daemon via the special file /var/run/docker.sock. You may need to adjust your user's permissions (typically by making yourself a member of the docker group) to get access to that file.

    The "TCP socket" option is for an unusual and hard-to-securely-configure mode of connecting to Docker. (Anyone who can run any docker command can run a container as root, and bind-mount any file from the host; you really don't want to make this level of access network-accessible.) You shouldn't ever need the TCP socket mode..