Last active
February 4, 2021 17:05
-
-
Save rachelslurs/4f04922ef0eb0607e6e048c65fd55627 to your computer and use it in GitHub Desktop.
Setting up docker-engine and docker-compose on an AMD64 linux machine running Ubuntu/PopOS
This file contains 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
# remove any existing things | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
# install docker engine | |
# add repo with trusted key | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
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 repo | |
sudo apt update | |
# install the docker-engine things | |
sudo apt-get install docker-ce docker-ce-cli containerd.io | |
# test it | |
sudo docker run hello-world | |
# manage docker as a non-root user | |
# add docker user group | |
sudo groupadd docker | |
# add your user to docker group | |
sudo usermod -aG docker $USER | |
# force group membership to be reevaluated without having to log out | |
newgrp docker | |
# test to see whether you can run docker without sudo | |
docker run hello-world | |
# configure docker to start on boot | |
sudo systemctl enable docker | |
# optionally for configuring the daemon visit https://docs.docker.com/config/daemon/systemd/ | |
# download docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
# make the binary executable | |
sudo chmod +x /usr/local/bin/docker-compose | |
# test to make sure it's installed | |
docker-compose --version | |
# install bash completion | |
sudo curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose | |
This file contains 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
# make a directory in your home folder | |
mkdir lib | |
# install dependencies | |
sudo apt-get install libssl-dev | |
sudo apt install autoconf | |
sudo apt install automake | |
sudo apt install libtool | |
sudo apt-get install tcl-dev | |
sudo apt-get install gettext | |
# install git to lib | |
cd lib | |
git clone https://github.com/git/git.git | |
cd git | |
# clone curl inside of the git repo | |
git clone https://github.com/curl/curl.git | |
cd curl | |
./buildconf | |
./configure | |
make | |
make install | |
# once we have curl installed, go back to the git directory | |
cd ../git | |
./configure | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment