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?

【備忘録】LinuxMint 22.1へDockerインストール

Posted at

備忘録です。
公式サイトのコマンドが古いのと、派生OSを使ってると未だにちょっと迷います。

参考: docker docs

リポジトリの登録

Archはamd64なのですが、環境によって変更が必要かもです。

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable"

nobleは/etc/os-releaseのUBUNTU_CODENAMEから。

Dockerの鍵をインストール。

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg

apt-keyが非推奨になったので、gpgを使います。

更新とDocker engineのインストール

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

Dockerを使うためにこれが必要らしいのです。

ユーザをDocker グループに入れる

rootしか使えないので、自分のユーザを追加。

sudo gpasswd -a $USER docker

ログアウト・ログインし、ユーザのプロファイルをリロード

動作確認

ajitama@work-os:~$ docker compose version
Docker Compose version v2.35.1
ajitama@work-os:~$ docker version
Client: Docker Engine - Community
 Version:           28.1.1
 API version:       1.49
 Go version:        go1.23.8
 Git commit:        4eba377
 Built:             Fri Apr 18 09:52:14 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.1.1
  API version:      1.49 (minimum version 1.24)
  Go version:       go1.23.8
  Git commit:       01f442b
  Built:            Fri Apr 18 09:52:14 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

誰かの役にたてば嬉しいです。

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?