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

                    Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                    Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

                    How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page