Last active
April 11, 2024 07:27
-
-
Save asimzeeshan/4f9891b2c9630678267fbe1b0556f9ea to your computer and use it in GitHub Desktop.
Install docker & docker-compose on Debian 9 (stretch)
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 | |
| ############################################################ | |
| # Get the pre-requisite packages installed | |
| ############################################################ | |
| apt install -y htop iotop iftop | |
| apt install -y curl apt-transport-https | |
| # Install docker | |
| curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
| cat > /etc/apt/sources.list.d/docker.list <<END \ | |
| deb [arch=amd64] https://download.docker.com/linux/debian stretch stable | |
| END | |
| apt update && apt install -y docker-ce | |
| # Install docker-compose from github releases | |
| curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
| chmod +x /usr/local/bin/docker-compose | |
| # Create a symblink for applications going somewhere else | |
| ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose | |
| ls -lha /usr/bin/docker-compose | |
| # get the versions information | |
| docker --version && docker-compose --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cat > /etc/apt/sources.list.d/docker.list <<END deb [arch=amd64] https://download.docker.com/linux/debian stretch stable END