0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Docker: Ubuntu 24.04 にインストール

Last updated at Posted at 2024-07-29

こちらと同じことを行いました。
Ubuntu24.04にDockerをインストールする

DockerリポジトリのGPGキーを取得

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

Dockerリポジトリをaptソースに追加

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt upgrade

インストール

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

バージョンの確認

$ sudo docker --version
Docker version 27.1.1, build 6312585

動作確認

$ sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.
(省略)

一般ユーザでDockerを使えるようにする

sudo usermod -aG docker uchida
newgrp docker

docker グループに uchida というユーザーが加わったことを確認

$ groups uchida
uchida : uchida sudo www-data docker

確認

docker run hello-world

composer のバージョン確認

$ docker compose version
Docker Compose version v2.29.1
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?