How to setup docker and docker-compose for sawtooth
#update apt | |
sudo apt-get update | |
#install dependencies of docker | |
sudo apt-get install apt-transport-https | |
sudo apt-get install ca-certificates | |
sudo apt-get install curl | |
sudo apt-get install software-properties-common | |
#add docker gpg key to system | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
#add docker to apt repository | |
#sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
#refresh repo | |
sudo apt-get update | |
#install docker | |
sudo apt-get install docker-ce | |
#add current user to docker group | |
sudo usermod -aG docker $USER | |
#Exit your console and relogin | |
#Test docker | |
#if this fails, there's probably a proxy or firewall | |
docker run hello-world | |
#get docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o ~/docker-compose | |
#install docker-compose to local bin | |
sudo mv docker-compose /usr/local/bin/docker-compose | |
#give executable permission to docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
#test compose installation | |
docker-compose --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Running
sudo usermod -aG docker $USER
gives root-equivalent permission to $USER, which may be OK in a development environment. An alternative is to define aliases fordocker
anddocker-compose
in your~/.bashrc
file (below). You still need to type your password the first time, but at least you don't have to typesudo
all the time: