Skip to content

Instantly share code, notes, and snippets.

@tandv592082
Created April 24, 2023 04:16
Show Gist options
  • Select an option

  • Save tandv592082/eaac27edd5cbeea6b72b887eb7cebf1d to your computer and use it in GitHub Desktop.

Select an option

Save tandv592082/eaac27edd5cbeea6b72b887eb7cebf1d to your computer and use it in GitHub Desktop.
Install docker ubuntu
#!bin/bash
# Update your system package index and install the required dependencies
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
# Add the Docker GPG key and add the Docker repository to your system
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"
# Update the system package index again and install Docker:
sudo apt update
sudo apt install docker-ce
# Install Docker Compose by downloading the latest stable release from the official Docker Compose GitHub repository:
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d'"' -f4)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# Make the Docker Compose binary executable:
sudo chmod +x /usr/local/bin/docker-compose
docker --version
docker-compose --version
@tandv592082
Copy link
Author

Installation:

  • Step 1: Create docker-installers.sh file.
  • Step 2: bash ./docker-installer.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment