Skip to content

A install script for docker and docker-compose on fresh Ubuntu systems to get a quick headstart

License

Notifications You must be signed in to change notification settings

Visuals3D/install-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Install-docker

A install script for docker and docker-compose on fresh Ubuntu 20.04 systems to get a quick headstart

Use the script

Just run the script in a terminal to install docker, docker-compose and make it executable without typing sudo for every docker command.

git clone https://github.com/Visuals3D/install-docker.git
cd ./install-docker
sudo chmod +x install-docker.sh
./install-docker.sh

How to manually install docker and docker-compose

If you want to you can follow this steps manually on your own to install docker, docker-compose and remove the need for sudo

Docker

Remove older Version

sudo apt-get remove docker docker-engine docker.io containerd runc

Install dependencies

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

Add official key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add Repo

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Finally Install Docker

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Test Installation

sudo docker --version

docker-compose

Download Package

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Make it executable

sudo chmod +x /usr/local/bin/docker-compose

Create sym Link

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Test Installation

docker-compose --version 

Remove need for sudo

Create a docker user group

sudo groupadd docker

Add own user to group

sudo gpasswd -a $USER docker

Refresh group to apply changes

newgrp docker

Test sudoless docker

docker ps -a

About

A install script for docker and docker-compose on fresh Ubuntu systems to get a quick headstart

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages