Last active
October 8, 2024 23:26
-
-
Save yunginnanet/40109b94e74dee0c9d8a8f03b8772afe to your computer and use it in GitHub Desktop.
install docker on ubuntu one liner
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
# pretty version | |
# | |
##!/bin/bash | |
# | |
## optional | |
#apt-get update | |
#apt-get -y full-upgrade | |
# | |
## pre-deps | |
#apt-get -y install git curl wget ca-certificates curl gnupg lsb-release | |
# | |
## clean and prep, probably optional | |
#mkdir -vp -m 0755 /etc/apt/keyrings && | |
# rm /etc/apt/keyrings/docker.gpg | |
# | |
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | | |
# gpg --dearmor -o /etc/apt/keyrings/docker.gpg && | |
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | | |
# sudo tee /etc/apt/sources.list.d/docker.list >/dev/null && | |
# apt-get -y update && | |
# apt-get -y install docker-ce docker-ce-cli \ | |
# containerd.io docker-buildx-plugin docker-compose-plugin | |
# | |
## test | |
#docker run hello-world | |
apt-get update; apt-get -y full-upgrade; apt-get -y install git curl wget ca-certificates curl gnupg lsb-release; mkdir -m 0755 -p /etc/apt/keyrings && rm /etc/apt/keyrings/docker.gpg; curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && apt-get -y update && apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; docker run hello-world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment