Skip to content

Instantly share code, notes, and snippets.

@andrewelkins
Last active February 2, 2020 21:53
Show Gist options
  • Select an option

  • Save andrewelkins/1adc587feb610f586f8f40b50b7efc3a to your computer and use it in GitHub Desktop.

Select an option

Save andrewelkins/1adc587feb610f586f8f40b50b7efc3a to your computer and use it in GitHub Desktop.

Revisions

  1. andrewelkins revised this gist Nov 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-docker-on-linux-mint-18.sh
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ then
    fi

    # Install extra packages
    echo $(apt-cache policy docker-engine) | grep "apt.dockerproject.org" 1>/dev/null 2>&1
    sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

    # Install Docker
    sudo apt-get install -y docker-engine
  2. andrewelkins revised this gist Nov 29, 2016. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions install-docker-on-linux-mint-18.sh
    Original file line number Diff line number Diff line change
    @@ -46,10 +46,13 @@ fi
    echo $(apt-cache policy docker-engine) | grep "apt.dockerproject.org" 1>/dev/null 2>&1

    # Install Docker
    sudo apt-get install -y docker-engine docker-compose
    sudo apt-get install -y docker-engine

    # Start Docker
    sudo service docker start

    # Add current user to docker group
    sudo usermod -a -G docker $USER
    sudo usermod -a -G docker $USER

    # Note
    echo "Install docker-compose by going to https://docs.docker.com/compose/install/"
  3. andrewelkins revised this gist Nov 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-docker-on-linux-mint-18.sh
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ fi
    echo $(apt-cache policy docker-engine) | grep "apt.dockerproject.org" 1>/dev/null 2>&1

    # Install Docker
    sudo apt-get install docker-engine
    sudo apt-get install -y docker-engine docker-compose

    # Start Docker
    sudo service docker start
  4. andrewelkins revised this gist Nov 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-docker-on-linux-mint-18.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ##########################################
    # To run:
    # curl -sSL https://gist.github.com/andrewelkins/---/install-docker-on-linux-mint-18.sh | bash -x
    # curl -sSL https://gist.github.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
    ##########################################

    # Kernel version http://stackoverflow.com/a/4024263
  5. andrewelkins created this gist Nov 28, 2016.
    55 changes: 55 additions & 0 deletions install-docker-on-linux-mint-18.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    ##########################################
    # To run:
    # curl -sSL https://gist.github.com/andrewelkins/---/install-docker-on-linux-mint-18.sh | bash -x
    ##########################################

    # Kernel version http://stackoverflow.com/a/4024263
    versionlte() {
    [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
    }
    versionlt() {
    [ "$1" = "$2" ] && return 1 || versionlte $1 $2
    }

    kernel_version=$(uname -r)
    minimum_kernel_version="3.10"

    # Check if kernel version is above 3.10
    if versionlt $kernel_version $minimum_kernel_version; then
    echo "Kernel version is below 3.10"
    exit
    fi

    # Check that HTTPS transport is available to APT
    if [ ! -e /usr/lib/apt/methods/https ]; then
    sudo apt-get update
    sudo apt-get install -y apt-transport-https
    fi

    # Add docker GPG key
    sudo apt-key adv \
    --keyserver hkp://ha.pool.sks-keyservers.net:80 \
    --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

    # Add deb for 16.04
    echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
    sudo apt-get update

    # Check docker-engine is pulling from dockerproject.org
    if ! `echo $(apt-cache policy docker-engine) | grep "apt.dockerproject.org" 1>/dev/null 2>&1`
    then
    echo "Docker project not correctly added to apt"
    exit
    fi

    # Install extra packages
    echo $(apt-cache policy docker-engine) | grep "apt.dockerproject.org" 1>/dev/null 2>&1

    # Install Docker
    sudo apt-get install docker-engine

    # Start Docker
    sudo service docker start

    # Add current user to docker group
    sudo usermod -a -G docker $USER