Created
April 24, 2023 04:16
-
-
Save tandv592082/eaac27edd5cbeea6b72b887eb7cebf1d to your computer and use it in GitHub Desktop.
Install docker ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation:
docker-installers.shfile.