Skip to content

Instantly share code, notes, and snippets.

@yongqianme
Created March 12, 2020 20:24
Show Gist options
  • Save yongqianme/cc0f6d447f6ea952c3fd858352a6e439 to your computer and use it in GitHub Desktop.
Save yongqianme/cc0f6d447f6ea952c3fd858352a6e439 to your computer and use it in GitHub Desktop.

Revisions

  1. yongqianme created this gist Mar 12, 2020.
    19 changes: 19 additions & 0 deletions docker-install-ubunut.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/bash
    # Install Docker (https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce)
    sudo apt-get remove docker docker-engine docker.io
    sudo apt-get update
    sudo apt-get --assume-yes install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo apt-key fingerprint 0EBFCD88
    sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"
    sudo apt-get update
    sudo apt-get --assume-yes install docker-ce
    # Allow user to manage docker
    sudo usermod -a -G docker $USER