Why docker command connects to daemon via tcp by defaultDocker can't connect to docker daemonFrom inside of a Docker container, how do I connect to the localhost of the machine?can't restart docker after resetting the docker socker using docker -H tcp://0.0.0.0:2375Docker command can't connect to Docker daemonUpdating docker registry in ubuntu 14.0“nginx-proxy” docker image socket volume not mountedCannot connect to the Docker daemonHow to connect to remote docker running on Ubuntu hostWhy is it vulnerable to bind docker daemon to 0.0.0.0?Can't talk to dind when using google/could-sdk instead of docker:stable in GitLab, why is that?

CREATE opcode: what does it really do?

How did Arya survive the stabbing?

Escape a backup date in a file name

Do the temporary hit points from Reckless Abandon stack if I make multiple attacks on my turn?

Type int? vs type int

when is out of tune ok?

Is `x >> pure y` equivalent to `liftM (const y) x`

Was Spock the First Vulcan in Starfleet?

What is the opposite of 'gravitas'?

How does the UK government determine the size of a mandate?

Is a stroke of luck acceptable after a series of unfavorable events?

How do I go from 300 unfinished/half written blog posts, to published posts?

How does it work when somebody invests in my business?

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

Go Pregnant or Go Home

What is the best translation for "slot" in the context of multiplayer video games?

What does the word "Atten" mean?

How do I find the solutions of the following equation?

Would a high gravity rocky planet be guaranteed to have an atmosphere?

Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?

Is HostGator storing my password in plaintext?

How to safely derail a train during transit?

How can a function with a hole (removable discontinuity) equal a function with no hole?

How can I kill an app using Terminal?



Why docker command connects to daemon via tcp by default


Docker can't connect to docker daemonFrom inside of a Docker container, how do I connect to the localhost of the machine?can't restart docker after resetting the docker socker using docker -H tcp://0.0.0.0:2375Docker command can't connect to Docker daemonUpdating docker registry in ubuntu 14.0“nginx-proxy” docker image socket volume not mountedCannot connect to the Docker daemonHow to connect to remote docker running on Ubuntu hostWhy is it vulnerable to bind docker daemon to 0.0.0.0?Can't talk to dind when using google/could-sdk instead of docker:stable in GitLab, why is that?













0















Docker is configured by default to listen on socket (Ubuntu 18.04).




$ ps aux | grep docker
root 1966 0.2 0.4 1451444 69700 ?

Ssl 09:57 0:01 /usr/bin/dockerd -H fd://
--containerd=/run/containerd/containerd.sock




But when I run docker ps it raises:




$ docker ps
Cannot connect to the Docker daemon at
tcp://127.0.0.1:2375. Is the docker daemon running?




I need to specify:




$ docker -H unix:///var/run/docker.sock ps
CONTAINER ID IMAGE

COMMAND CREATED STATUS PORTS
NAMES 7ffd2dc852f2 jwilder/nginx-proxy

"/app/docker-entrypo…" 5 minutes ago Up 5 minutes

0.0.0.0:80->80/tcp nginx-proxy




Then works fine, but why cli wants to connect daemon by default via tcp? How to avoid that?










share|improve this question


























    0















    Docker is configured by default to listen on socket (Ubuntu 18.04).




    $ ps aux | grep docker
    root 1966 0.2 0.4 1451444 69700 ?

    Ssl 09:57 0:01 /usr/bin/dockerd -H fd://
    --containerd=/run/containerd/containerd.sock




    But when I run docker ps it raises:




    $ docker ps
    Cannot connect to the Docker daemon at
    tcp://127.0.0.1:2375. Is the docker daemon running?




    I need to specify:




    $ docker -H unix:///var/run/docker.sock ps
    CONTAINER ID IMAGE

    COMMAND CREATED STATUS PORTS
    NAMES 7ffd2dc852f2 jwilder/nginx-proxy

    "/app/docker-entrypo…" 5 minutes ago Up 5 minutes

    0.0.0.0:80->80/tcp nginx-proxy




    Then works fine, but why cli wants to connect daemon by default via tcp? How to avoid that?










    share|improve this question
























      0












      0








      0








      Docker is configured by default to listen on socket (Ubuntu 18.04).




      $ ps aux | grep docker
      root 1966 0.2 0.4 1451444 69700 ?

      Ssl 09:57 0:01 /usr/bin/dockerd -H fd://
      --containerd=/run/containerd/containerd.sock




      But when I run docker ps it raises:




      $ docker ps
      Cannot connect to the Docker daemon at
      tcp://127.0.0.1:2375. Is the docker daemon running?




      I need to specify:




      $ docker -H unix:///var/run/docker.sock ps
      CONTAINER ID IMAGE

      COMMAND CREATED STATUS PORTS
      NAMES 7ffd2dc852f2 jwilder/nginx-proxy

      "/app/docker-entrypo…" 5 minutes ago Up 5 minutes

      0.0.0.0:80->80/tcp nginx-proxy




      Then works fine, but why cli wants to connect daemon by default via tcp? How to avoid that?










      share|improve this question














      Docker is configured by default to listen on socket (Ubuntu 18.04).




      $ ps aux | grep docker
      root 1966 0.2 0.4 1451444 69700 ?

      Ssl 09:57 0:01 /usr/bin/dockerd -H fd://
      --containerd=/run/containerd/containerd.sock




      But when I run docker ps it raises:




      $ docker ps
      Cannot connect to the Docker daemon at
      tcp://127.0.0.1:2375. Is the docker daemon running?




      I need to specify:




      $ docker -H unix:///var/run/docker.sock ps
      CONTAINER ID IMAGE

      COMMAND CREATED STATUS PORTS
      NAMES 7ffd2dc852f2 jwilder/nginx-proxy

      "/app/docker-entrypo…" 5 minutes ago Up 5 minutes

      0.0.0.0:80->80/tcp nginx-proxy




      Then works fine, but why cli wants to connect daemon by default via tcp? How to avoid that?







      docker ubuntu






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 9:46









      DanielDaniel

      213




      213






















          1 Answer
          1






          active

          oldest

          votes


















          0














          docker client uses DOCKER_HOST environment value if set otherwise default to unix:///var/run/docker.sock. Check if you have DOCKER_HOST environment variable set?






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060551%2fwhy-docker-command-connects-to-daemon-via-tcp-by-default%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            docker client uses DOCKER_HOST environment value if set otherwise default to unix:///var/run/docker.sock. Check if you have DOCKER_HOST environment variable set?






            share|improve this answer



























              0














              docker client uses DOCKER_HOST environment value if set otherwise default to unix:///var/run/docker.sock. Check if you have DOCKER_HOST environment variable set?






              share|improve this answer

























                0












                0








                0







                docker client uses DOCKER_HOST environment value if set otherwise default to unix:///var/run/docker.sock. Check if you have DOCKER_HOST environment variable set?






                share|improve this answer













                docker client uses DOCKER_HOST environment value if set otherwise default to unix:///var/run/docker.sock. Check if you have DOCKER_HOST environment variable set?







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 11:08









                Aakash SharmaAakash Sharma

                1483




                1483





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060551%2fwhy-docker-command-connects-to-daemon-via-tcp-by-default%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

                    Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

                    List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229