Installing Docker on Ubuntu 16.04 - Setting up repository











up vote
7
down vote

favorite
2












I am trying to install docker on Ubuntu 16.04. I am a complete Ubuntu newbie and only installed it recently.



Here are the installation steps: https://docs.docker.com/engine/installation/linux/ubuntu/



In order to setup the directory, I have to run this command:



bash $ sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


I am quite confused on what to copy and paste exactly.
I first copied and pasted everything from sudo:



sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


But I get the following errors:



E: Unable to locate package curl 
E: Unable to locate package apt-transport-https
E: Unable to locate package ca-certificates
E: Unable to locate package curl
E: Unable to locate package software-properties-common


Do you know what those erros mean and what can I do to install Docker properly?



Thank you.










share|improve this question
























  • thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
    – user2505650
    Feb 13 '17 at 21:06










  • Would it be okey to just install it without adding the repository?
    – M. Becerra
    Feb 13 '17 at 21:16










  • how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
    – user2505650
    Feb 13 '17 at 21:18






  • 1




    The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
    – M. Becerra
    Feb 13 '17 at 21:20












  • yes it is working now, thank you very much !
    – user2505650
    Feb 13 '17 at 21:28















up vote
7
down vote

favorite
2












I am trying to install docker on Ubuntu 16.04. I am a complete Ubuntu newbie and only installed it recently.



Here are the installation steps: https://docs.docker.com/engine/installation/linux/ubuntu/



In order to setup the directory, I have to run this command:



bash $ sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


I am quite confused on what to copy and paste exactly.
I first copied and pasted everything from sudo:



sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


But I get the following errors:



E: Unable to locate package curl 
E: Unable to locate package apt-transport-https
E: Unable to locate package ca-certificates
E: Unable to locate package curl
E: Unable to locate package software-properties-common


Do you know what those erros mean and what can I do to install Docker properly?



Thank you.










share|improve this question
























  • thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
    – user2505650
    Feb 13 '17 at 21:06










  • Would it be okey to just install it without adding the repository?
    – M. Becerra
    Feb 13 '17 at 21:16










  • how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
    – user2505650
    Feb 13 '17 at 21:18






  • 1




    The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
    – M. Becerra
    Feb 13 '17 at 21:20












  • yes it is working now, thank you very much !
    – user2505650
    Feb 13 '17 at 21:28













up vote
7
down vote

favorite
2









up vote
7
down vote

favorite
2






2





I am trying to install docker on Ubuntu 16.04. I am a complete Ubuntu newbie and only installed it recently.



Here are the installation steps: https://docs.docker.com/engine/installation/linux/ubuntu/



In order to setup the directory, I have to run this command:



bash $ sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


I am quite confused on what to copy and paste exactly.
I first copied and pasted everything from sudo:



sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


But I get the following errors:



E: Unable to locate package curl 
E: Unable to locate package apt-transport-https
E: Unable to locate package ca-certificates
E: Unable to locate package curl
E: Unable to locate package software-properties-common


Do you know what those erros mean and what can I do to install Docker properly?



Thank you.










share|improve this question















I am trying to install docker on Ubuntu 16.04. I am a complete Ubuntu newbie and only installed it recently.



Here are the installation steps: https://docs.docker.com/engine/installation/linux/ubuntu/



In order to setup the directory, I have to run this command:



bash $ sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


I am quite confused on what to copy and paste exactly.
I first copied and pasted everything from sudo:



sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common


But I get the following errors:



E: Unable to locate package curl 
E: Unable to locate package apt-transport-https
E: Unable to locate package ca-certificates
E: Unable to locate package curl
E: Unable to locate package software-properties-common


Do you know what those erros mean and what can I do to install Docker properly?



Thank you.







apt package-management repository docker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 13 '17 at 20:59









M. Becerra

2,28151131




2,28151131










asked Feb 13 '17 at 20:55









user2505650

138115




138115












  • thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
    – user2505650
    Feb 13 '17 at 21:06










  • Would it be okey to just install it without adding the repository?
    – M. Becerra
    Feb 13 '17 at 21:16










  • how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
    – user2505650
    Feb 13 '17 at 21:18






  • 1




    The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
    – M. Becerra
    Feb 13 '17 at 21:20












  • yes it is working now, thank you very much !
    – user2505650
    Feb 13 '17 at 21:28


















  • thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
    – user2505650
    Feb 13 '17 at 21:06










  • Would it be okey to just install it without adding the repository?
    – M. Becerra
    Feb 13 '17 at 21:16










  • how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
    – user2505650
    Feb 13 '17 at 21:18






  • 1




    The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
    – M. Becerra
    Feb 13 '17 at 21:20












  • yes it is working now, thank you very much !
    – user2505650
    Feb 13 '17 at 21:28
















thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
– user2505650
Feb 13 '17 at 21:06




thank you for your answer, sorry I forgot to mention that I tried that, as a result I get: 'bash: $: No such file or directory
– user2505650
Feb 13 '17 at 21:06












Would it be okey to just install it without adding the repository?
– M. Becerra
Feb 13 '17 at 21:16




Would it be okey to just install it without adding the repository?
– M. Becerra
Feb 13 '17 at 21:16












how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
– user2505650
Feb 13 '17 at 21:18




how would I install it without the repo? and it is clearly mentionned that you need to setup the directory
– user2505650
Feb 13 '17 at 21:18




1




1




The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
– M. Becerra
Feb 13 '17 at 21:20






The repository is not the only way to install the program, its handy and simple for later updates though. You can install it following this instructions.
– M. Becerra
Feb 13 '17 at 21:20














yes it is working now, thank you very much !
– user2505650
Feb 13 '17 at 21:28




yes it is working now, thank you very much !
– user2505650
Feb 13 '17 at 21:28










4 Answers
4






active

oldest

votes

















up vote
10
down vote



accepted










The command you entered is mostly correct, however, it suffers from a flaw: those are supposed to escape newlines, not spaces. The command in the docs is:



$ sudo apt-get install -y --no-install-recommends 
apt-transport-https
ca-certificates
curl
software-properties-common


This should be copy-pasted as-is (except the leading $) or typed in similarly. By removing the newlines, this is what happened:



$ printf "|%s|n" sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common
|sudo|
|apt-get|
|-y|
|--no-install-recommends|
|install|
| curl|
| apt-transport-https|
| ca-certificates|
| curl|
| software-properties-common|


As you can see, the spaces became part of the package names. That is why apt-get couldn't find them. Do either of:



sudo apt-get -y --no-install-recommends install curl apt-transport-https ca-certificates software-properties-common


Or:



sudo apt-get -y --no-install-recommends install 
curl
apt-transport-https
ca-certificates
software-properties-common





share|improve this answer





















  • @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
    – M. Becerra
    Feb 15 '17 at 21:42


















up vote
5
down vote













Installation from a .deb package



If you cannot use Docker’s repository to install Docker, you can download the .deb file for your release and install it manually. You will need to download a new file each time you want to upgrade Docker.




  • Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu (latest version 1.13.1 for Ubuntu 16.04).



  • Install Docker, changing the path below to the path where you downloaded the Docker package.



    sudo dpkg -i /path/to/package.deb


    The Docker daemon starts automatically.




  • Verify that docker is installed correctly by running the hello-world image.



    sudo docker run hello-world


    This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.




Docker is installed and running. You need to use sudo to run Docker commands.





Source: https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package






share|improve this answer






























    up vote
    3
    down vote













    Although you can set up the repo and install it manually, there is a faster way using the official convenience script.



    As of 2018, to install docker-ce on Ubuntu 16.04 or Ubuntu 18.04, the command for the automated install is:



    curl https://get.docker.com | sudo sh


    Read the security note printed in output toward the end of the install. Note that the script at the URL used above is maintained in the docker-install repo.



    This installs the package and the repo. To confirm:



    $ apt list docker-ce* 2>&- | grep installed
    docker-ce/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]
    docker-ce-cli/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]


    Verify installation:



    sudo docker run hello-world
    sudo docker version


    Continue with post-installation steps.






    share|improve this answer























    • Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
      – DannyB
      Jul 25 '17 at 9:24










    • @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
      – A-B-B
      Jul 25 '17 at 13:15










    • Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
      – DannyB
      Jul 26 '17 at 14:32


















    up vote
    1
    down vote













    The Docker installation package available in the official Ubuntu repository may not be the latest version. So I woluld not suggest to intstall docker from Ubuntu repositpry. To get the latest version, install Docker from the official Docker repository.



    For doing this first of all we will add , the GPG key for the official Docker repository to our machine by curl command



    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


    now we will add the Docker repository to my APT sources:



    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


    update the package database with the Docker packages from the newly added repository



    sudo apt-get update


    Finally, install Docker by apt-get command



    sudo apt-get install -y docker-ce


    Docker should now be installed and running. to check weather docker service has been started or not we should run the command sudo service docker status. This will sow me the status of docker service. For detailed information you can watch at https://www.youtube.com/watch?v=fiiJyemUFOc






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      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',
      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%2faskubuntu.com%2fquestions%2f883032%2finstalling-docker-on-ubuntu-16-04-setting-up-repository%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      10
      down vote



      accepted










      The command you entered is mostly correct, however, it suffers from a flaw: those are supposed to escape newlines, not spaces. The command in the docs is:



      $ sudo apt-get install -y --no-install-recommends 
      apt-transport-https
      ca-certificates
      curl
      software-properties-common


      This should be copy-pasted as-is (except the leading $) or typed in similarly. By removing the newlines, this is what happened:



      $ printf "|%s|n" sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common
      |sudo|
      |apt-get|
      |-y|
      |--no-install-recommends|
      |install|
      | curl|
      | apt-transport-https|
      | ca-certificates|
      | curl|
      | software-properties-common|


      As you can see, the spaces became part of the package names. That is why apt-get couldn't find them. Do either of:



      sudo apt-get -y --no-install-recommends install curl apt-transport-https ca-certificates software-properties-common


      Or:



      sudo apt-get -y --no-install-recommends install 
      curl
      apt-transport-https
      ca-certificates
      software-properties-common





      share|improve this answer





















      • @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
        – M. Becerra
        Feb 15 '17 at 21:42















      up vote
      10
      down vote



      accepted










      The command you entered is mostly correct, however, it suffers from a flaw: those are supposed to escape newlines, not spaces. The command in the docs is:



      $ sudo apt-get install -y --no-install-recommends 
      apt-transport-https
      ca-certificates
      curl
      software-properties-common


      This should be copy-pasted as-is (except the leading $) or typed in similarly. By removing the newlines, this is what happened:



      $ printf "|%s|n" sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common
      |sudo|
      |apt-get|
      |-y|
      |--no-install-recommends|
      |install|
      | curl|
      | apt-transport-https|
      | ca-certificates|
      | curl|
      | software-properties-common|


      As you can see, the spaces became part of the package names. That is why apt-get couldn't find them. Do either of:



      sudo apt-get -y --no-install-recommends install curl apt-transport-https ca-certificates software-properties-common


      Or:



      sudo apt-get -y --no-install-recommends install 
      curl
      apt-transport-https
      ca-certificates
      software-properties-common





      share|improve this answer





















      • @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
        – M. Becerra
        Feb 15 '17 at 21:42













      up vote
      10
      down vote



      accepted







      up vote
      10
      down vote



      accepted






      The command you entered is mostly correct, however, it suffers from a flaw: those are supposed to escape newlines, not spaces. The command in the docs is:



      $ sudo apt-get install -y --no-install-recommends 
      apt-transport-https
      ca-certificates
      curl
      software-properties-common


      This should be copy-pasted as-is (except the leading $) or typed in similarly. By removing the newlines, this is what happened:



      $ printf "|%s|n" sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common
      |sudo|
      |apt-get|
      |-y|
      |--no-install-recommends|
      |install|
      | curl|
      | apt-transport-https|
      | ca-certificates|
      | curl|
      | software-properties-common|


      As you can see, the spaces became part of the package names. That is why apt-get couldn't find them. Do either of:



      sudo apt-get -y --no-install-recommends install curl apt-transport-https ca-certificates software-properties-common


      Or:



      sudo apt-get -y --no-install-recommends install 
      curl
      apt-transport-https
      ca-certificates
      software-properties-common





      share|improve this answer












      The command you entered is mostly correct, however, it suffers from a flaw: those are supposed to escape newlines, not spaces. The command in the docs is:



      $ sudo apt-get install -y --no-install-recommends 
      apt-transport-https
      ca-certificates
      curl
      software-properties-common


      This should be copy-pasted as-is (except the leading $) or typed in similarly. By removing the newlines, this is what happened:



      $ printf "|%s|n" sudo apt-get -y --no-install-recommends install  curl  apt-transport-https  ca-certificates  curl  software-properties-common
      |sudo|
      |apt-get|
      |-y|
      |--no-install-recommends|
      |install|
      | curl|
      | apt-transport-https|
      | ca-certificates|
      | curl|
      | software-properties-common|


      As you can see, the spaces became part of the package names. That is why apt-get couldn't find them. Do either of:



      sudo apt-get -y --no-install-recommends install curl apt-transport-https ca-certificates software-properties-common


      Or:



      sudo apt-get -y --no-install-recommends install 
      curl
      apt-transport-https
      ca-certificates
      software-properties-common






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Feb 14 '17 at 11:40









      muru

      134k19282482




      134k19282482












      • @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
        – M. Becerra
        Feb 15 '17 at 21:42


















      • @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
        – M. Becerra
        Feb 15 '17 at 21:42
















      @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
      – M. Becerra
      Feb 15 '17 at 21:42




      @user2505650 - I think you should have accepted this answer, not mine. Mine may work, but this one answers exactly and more precisely what you came asking in the first place :)
      – M. Becerra
      Feb 15 '17 at 21:42












      up vote
      5
      down vote













      Installation from a .deb package



      If you cannot use Docker’s repository to install Docker, you can download the .deb file for your release and install it manually. You will need to download a new file each time you want to upgrade Docker.




      • Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu (latest version 1.13.1 for Ubuntu 16.04).



      • Install Docker, changing the path below to the path where you downloaded the Docker package.



        sudo dpkg -i /path/to/package.deb


        The Docker daemon starts automatically.




      • Verify that docker is installed correctly by running the hello-world image.



        sudo docker run hello-world


        This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.




      Docker is installed and running. You need to use sudo to run Docker commands.





      Source: https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package






      share|improve this answer



























        up vote
        5
        down vote













        Installation from a .deb package



        If you cannot use Docker’s repository to install Docker, you can download the .deb file for your release and install it manually. You will need to download a new file each time you want to upgrade Docker.




        • Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu (latest version 1.13.1 for Ubuntu 16.04).



        • Install Docker, changing the path below to the path where you downloaded the Docker package.



          sudo dpkg -i /path/to/package.deb


          The Docker daemon starts automatically.




        • Verify that docker is installed correctly by running the hello-world image.



          sudo docker run hello-world


          This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.




        Docker is installed and running. You need to use sudo to run Docker commands.





        Source: https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package






        share|improve this answer

























          up vote
          5
          down vote










          up vote
          5
          down vote









          Installation from a .deb package



          If you cannot use Docker’s repository to install Docker, you can download the .deb file for your release and install it manually. You will need to download a new file each time you want to upgrade Docker.




          • Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu (latest version 1.13.1 for Ubuntu 16.04).



          • Install Docker, changing the path below to the path where you downloaded the Docker package.



            sudo dpkg -i /path/to/package.deb


            The Docker daemon starts automatically.




          • Verify that docker is installed correctly by running the hello-world image.



            sudo docker run hello-world


            This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.




          Docker is installed and running. You need to use sudo to run Docker commands.





          Source: https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package






          share|improve this answer














          Installation from a .deb package



          If you cannot use Docker’s repository to install Docker, you can download the .deb file for your release and install it manually. You will need to download a new file each time you want to upgrade Docker.




          • Go to https://apt.dockerproject.org/repo/pool/main/d/docker-engine/ and download the .deb file for the Docker version you want to install and for your version of Ubuntu (latest version 1.13.1 for Ubuntu 16.04).



          • Install Docker, changing the path below to the path where you downloaded the Docker package.



            sudo dpkg -i /path/to/package.deb


            The Docker daemon starts automatically.




          • Verify that docker is installed correctly by running the hello-world image.



            sudo docker run hello-world


            This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.




          Docker is installed and running. You need to use sudo to run Docker commands.





          Source: https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 14 '17 at 11:30

























          answered Feb 13 '17 at 23:42









          M. Becerra

          2,28151131




          2,28151131






















              up vote
              3
              down vote













              Although you can set up the repo and install it manually, there is a faster way using the official convenience script.



              As of 2018, to install docker-ce on Ubuntu 16.04 or Ubuntu 18.04, the command for the automated install is:



              curl https://get.docker.com | sudo sh


              Read the security note printed in output toward the end of the install. Note that the script at the URL used above is maintained in the docker-install repo.



              This installs the package and the repo. To confirm:



              $ apt list docker-ce* 2>&- | grep installed
              docker-ce/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]
              docker-ce-cli/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]


              Verify installation:



              sudo docker run hello-world
              sudo docker version


              Continue with post-installation steps.






              share|improve this answer























              • Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
                – DannyB
                Jul 25 '17 at 9:24










              • @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
                – A-B-B
                Jul 25 '17 at 13:15










              • Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
                – DannyB
                Jul 26 '17 at 14:32















              up vote
              3
              down vote













              Although you can set up the repo and install it manually, there is a faster way using the official convenience script.



              As of 2018, to install docker-ce on Ubuntu 16.04 or Ubuntu 18.04, the command for the automated install is:



              curl https://get.docker.com | sudo sh


              Read the security note printed in output toward the end of the install. Note that the script at the URL used above is maintained in the docker-install repo.



              This installs the package and the repo. To confirm:



              $ apt list docker-ce* 2>&- | grep installed
              docker-ce/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]
              docker-ce-cli/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]


              Verify installation:



              sudo docker run hello-world
              sudo docker version


              Continue with post-installation steps.






              share|improve this answer























              • Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
                – DannyB
                Jul 25 '17 at 9:24










              • @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
                – A-B-B
                Jul 25 '17 at 13:15










              • Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
                – DannyB
                Jul 26 '17 at 14:32













              up vote
              3
              down vote










              up vote
              3
              down vote









              Although you can set up the repo and install it manually, there is a faster way using the official convenience script.



              As of 2018, to install docker-ce on Ubuntu 16.04 or Ubuntu 18.04, the command for the automated install is:



              curl https://get.docker.com | sudo sh


              Read the security note printed in output toward the end of the install. Note that the script at the URL used above is maintained in the docker-install repo.



              This installs the package and the repo. To confirm:



              $ apt list docker-ce* 2>&- | grep installed
              docker-ce/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]
              docker-ce-cli/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]


              Verify installation:



              sudo docker run hello-world
              sudo docker version


              Continue with post-installation steps.






              share|improve this answer














              Although you can set up the repo and install it manually, there is a faster way using the official convenience script.



              As of 2018, to install docker-ce on Ubuntu 16.04 or Ubuntu 18.04, the command for the automated install is:



              curl https://get.docker.com | sudo sh


              Read the security note printed in output toward the end of the install. Note that the script at the URL used above is maintained in the docker-install repo.



              This installs the package and the repo. To confirm:



              $ apt list docker-ce* 2>&- | grep installed
              docker-ce/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]
              docker-ce-cli/now 5:18.09.0~3-0~ubuntu-xenial amd64 [installed,local]


              Verify installation:



              sudo docker run hello-world
              sudo docker version


              Continue with post-installation steps.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 19 at 22:33

























              answered Jul 9 '17 at 6:02









              A-B-B

              5901512




              5901512












              • Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
                – DannyB
                Jul 25 '17 at 9:24










              • @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
                – A-B-B
                Jul 25 '17 at 13:15










              • Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
                – DannyB
                Jul 26 '17 at 14:32


















              • Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
                – DannyB
                Jul 25 '17 at 9:24










              • @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
                – A-B-B
                Jul 25 '17 at 13:15










              • Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
                – DannyB
                Jul 26 '17 at 14:32
















              Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
              – DannyB
              Jul 25 '17 at 9:24




              Where did you find this? The official installation instructions (as well as the other sites that talk about docker installation) are way too long, and this script is easy. Should be prominently mentioned in the official docker install instructions instead of all this
              – DannyB
              Jul 25 '17 at 9:24












              @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
              – A-B-B
              Jul 25 '17 at 13:15




              @DannyB I had linked to the docker-install repo in my answer. Also see github.com/moby/moby/issues/31514
              – A-B-B
              Jul 25 '17 at 13:15












              Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
              – DannyB
              Jul 26 '17 at 14:32




              Thanks for this. I hope they opt to update the get.docker.com install script rather than deprecate it, I hate the multi-step installation, and apparently I am not the only one.
              – DannyB
              Jul 26 '17 at 14:32










              up vote
              1
              down vote













              The Docker installation package available in the official Ubuntu repository may not be the latest version. So I woluld not suggest to intstall docker from Ubuntu repositpry. To get the latest version, install Docker from the official Docker repository.



              For doing this first of all we will add , the GPG key for the official Docker repository to our machine by curl command



              curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


              now we will add the Docker repository to my APT sources:



              sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


              update the package database with the Docker packages from the newly added repository



              sudo apt-get update


              Finally, install Docker by apt-get command



              sudo apt-get install -y docker-ce


              Docker should now be installed and running. to check weather docker service has been started or not we should run the command sudo service docker status. This will sow me the status of docker service. For detailed information you can watch at https://www.youtube.com/watch?v=fiiJyemUFOc






              share|improve this answer

























                up vote
                1
                down vote













                The Docker installation package available in the official Ubuntu repository may not be the latest version. So I woluld not suggest to intstall docker from Ubuntu repositpry. To get the latest version, install Docker from the official Docker repository.



                For doing this first of all we will add , the GPG key for the official Docker repository to our machine by curl command



                curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


                now we will add the Docker repository to my APT sources:



                sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


                update the package database with the Docker packages from the newly added repository



                sudo apt-get update


                Finally, install Docker by apt-get command



                sudo apt-get install -y docker-ce


                Docker should now be installed and running. to check weather docker service has been started or not we should run the command sudo service docker status. This will sow me the status of docker service. For detailed information you can watch at https://www.youtube.com/watch?v=fiiJyemUFOc






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  The Docker installation package available in the official Ubuntu repository may not be the latest version. So I woluld not suggest to intstall docker from Ubuntu repositpry. To get the latest version, install Docker from the official Docker repository.



                  For doing this first of all we will add , the GPG key for the official Docker repository to our machine by curl command



                  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


                  now we will add the Docker repository to my APT sources:



                  sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


                  update the package database with the Docker packages from the newly added repository



                  sudo apt-get update


                  Finally, install Docker by apt-get command



                  sudo apt-get install -y docker-ce


                  Docker should now be installed and running. to check weather docker service has been started or not we should run the command sudo service docker status. This will sow me the status of docker service. For detailed information you can watch at https://www.youtube.com/watch?v=fiiJyemUFOc






                  share|improve this answer












                  The Docker installation package available in the official Ubuntu repository may not be the latest version. So I woluld not suggest to intstall docker from Ubuntu repositpry. To get the latest version, install Docker from the official Docker repository.



                  For doing this first of all we will add , the GPG key for the official Docker repository to our machine by curl command



                  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


                  now we will add the Docker repository to my APT sources:



                  sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


                  update the package database with the Docker packages from the newly added repository



                  sudo apt-get update


                  Finally, install Docker by apt-get command



                  sudo apt-get install -y docker-ce


                  Docker should now be installed and running. to check weather docker service has been started or not we should run the command sudo service docker status. This will sow me the status of docker service. For detailed information you can watch at https://www.youtube.com/watch?v=fiiJyemUFOc







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 16 '17 at 15:34









                  Amit Malik

                  16111




                  16111






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f883032%2finstalling-docker-on-ubuntu-16-04-setting-up-repository%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 did Captain America manage to do this?

                      迪纳利

                      南乌拉尔铁路局