Install docker on Ubuntu 18.04

By | 2020년 8월 19일
Table of Content

Install docker community edition on Ubuntu 18.04

Docker CE 설치하기

vi docker.sh
#!/bin/bash

sudo apt-get update && sudo apt-get install -y \
    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"

# docker-ce
sudo apt-get update && sudo apt-get install -y docker-ce

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

# docker-machine
sudo curl -L https://github.com/docker/machine/releases/download/v0.13.0/docker-machine-`uname -s`-`uname -m` -o /usr/local/bin/docker-machine
sudo chmod +x /usr/local/bin/docker-machine

sudo usermod -aG docker $USER
sh docker.sh

재접속합니다.

docker version