Skip to content

Instantly share code, notes, and snippets.

@peteygao
Last active February 17, 2024 05:03
Show Gist options
  • Select an option

  • Save peteygao/a26d63e2089dda4644c4d1630d358ef9 to your computer and use it in GitHub Desktop.

Select an option

Save peteygao/a26d63e2089dda4644c4d1630d358ef9 to your computer and use it in GitHub Desktop.

Revisions

  1. peteygao revised this gist Apr 30, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,6 @@ sudo apt-get install -y docker-ce
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
    sudo usermod -aG docker ubuntu
    sudo systemctl enable docker
    sudo systemctl start docker
  2. peteygao revised this gist Apr 30, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,6 @@ sudo apt-get install -y docker-ce
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
    sudo usermod -aG docker $USER
    sudo systemctl enable docker
    sudo systemctl start docker
  3. peteygao revised this gist Apr 29, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,7 @@ sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.bak
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

    # Perform the actual Docker related installation
    sudo apt update
    sudo apt-get install -y apt-transport-https ca-certificates software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
  4. peteygao revised this gist Apr 29, 2021. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,13 @@
    # Create a 1GiB Swap File
    # Lightsail ubuntu image doesn't boot with swap.
    # If you run out of RAM, the system hangs OOM.
    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.bak
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

    sudo apt update
    sudo apt-get install -y apt-transport-https ca-certificates software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
    @@ -7,14 +17,4 @@ sudo apt-get install -y docker-ce
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER

    # Create a 1GiB Swap File
    # Lightsail ubuntu image doesn't boot with swap.
    # If you run out of RAM, the system hangs OOM.
    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.bak
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
    sudo usermod -aG docker $USER
  5. peteygao revised this gist Apr 29, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,9 @@ sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER

    # Create a 1GiB Swap File (Lightsail ubuntu image doesn't boot with swap)
    # Create a 1GiB Swap File
    # Lightsail ubuntu image doesn't boot with swap.
    # If you run out of RAM, the system hangs OOM.
    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
  6. peteygao revised this gist Apr 29, 2021. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    sudo apt update
    sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
    sudo apt-get install -y apt-transport-https ca-certificates software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt update
    @@ -8,5 +8,11 @@ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
    sudo systemctl start docker
    sudo systemctl enable docker

    # Create a 1GiB Swap File (Lightsail ubuntu image doesn't boot with swap)
    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo cp /etc/fstab /etc/fstab.bak
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
  7. peteygao revised this gist Apr 29, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt update
    sudo apt-get install -y docker-ce
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
  8. peteygao revised this gist Apr 29, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    sudo apt update
    sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt update
    sudo apt-get install -y docker-ce
  9. peteygao created this gist Apr 26, 2021.
    11 changes: 11 additions & 0 deletions install_docker.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    sudo apt update
    sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt update
    sudo apt-get install -y docker-ce
    sudo chmod +x /usr/local/bin/docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
    sudo systemctl start docker
    sudo systemctl enable docker