Pages - Menu

標籤

AWS (1) bash (1) Boost (2) C (2) CMake (2) Concurrency_Programming (3) CPP (37) Database (2) DNS (1) Docker (4) Docker-Compose (1) ELK (1) emacs (4) gcp (1) gdrive (1) git (1) gitbash (2) gitlab (1) kvm (4) Linux (5) MT4 (4) MT5 (4) Multicast (2) MySQL (2) Nijatrader8 (1) OpenCV (1) Python (4) QT5 (1) R (1) rdp (3) screenshot (1) ssh (3) Tabnine (1) TCP (1) TensorFlow (1) Tools (12) Ubuntu_1904 (11) Ubuntu_20_04 (5) UDP (1) VS2010 (1) VS2015 (1) VS2019 (1) WebServer (1) Win10 (1) winmerge (1) WSL (1) xrdp (1)

搜尋此網誌

2019年8月10日星期六

Install Docker on ubuntu

Steps:

  • on Ubuntu 18.04 / 19.04

$ sudo apt-get 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 edge"
$ sudo apt-get update
$ apt-cache policy docker-ce
$ sudo apt-get install -y docker-ce
$ sudo systemctl status docker

Learn From:

link

Steps:

  • on Ubuntu 20.04


sudo apt install docker.io
sudo systemctl enable --now docker
docker --version


Learn From

Use docker by non-root user:

To display all users run following command: 

 $ compgen -u

To display all groups run following command:
$ compgen -g
If there has no group docker, you can add it first:
$ sudo groupadd docker
Then add user to docker group:
$ sudo usermod -aG docker [non-root user] 

Restart or re logon to activate this setting.

沒有留言:

發佈留言