업데이트:

WSL2 에 Docker 설치 (without Docker Desktop)

Docker Desktop

Docker Desktop remains free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), personal use, education, and non-commercial open source projects.

  • WSL2 이후, Docker Desktop 의 기능을 따로 사용하지 않아도 CLI 기능으로도 충분
    • 개인적으로 Hyper-v VM 사용 권고

Docker install without docker desktop

WSL2 Install

Docker install

# Update the apt package list.
$ sudo apt-get update -y

# Install Docker's package dependencies.
$ sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

# Download and add Docker's official public PGP key.
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# Verify the fingerprint.
$ sudo apt-key fingerprint 0EBFCD88

# Add the `stable` channel's Docker upstream repository.
#
# If you want to live on the edge, you can change "stable" below to "test" or
# "nightly". I highly recommend sticking with stable!
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

# Update the apt package list (for the new apt repo).
$ sudo apt-get update -y

# Install the latest version of Docker CE.
$ sudo apt-get install -y docker-ce

# Allow your user to access the Docker CLI without needing root access.
$ sudo usermod -aG docker $USER
# START DOCKER DAEMON
$ sudo service docker start
$ sudo service docker status

$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

댓글남기기