0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Install docker on Fedora31

Last updated at Posted at 2020-07-16

docker.png

Overview

開発用サーバにDockerを入れたので、その際の作業メモ
(公式ドキュメントに従えば基本問題ない)

Docs

Docker: https://docs.docker.com/engine/install/fedora/
Docker Compose: https://docs.docker.com/compose/install/#install-compose-on-linux-systems

How to install docker

$ sudo dnf -y install dnf-plugins-core  
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
$ sudo dnf install docker-ce docker-ce-cli containerd.io
$ sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
$ reboot (再起動)
$ sudo systemctl start docker
$ sudo docker run hello-world

以下が表示されればOK

Hello from Docker!
...

Docker をブート時に自動起動するには

$ sudo systemctl enable docker

sudoなしで使用するには

sudo usermod -aG docker [YOUR-USER]

How to install docker compose

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

ここでpythonがないと言われたので

$ sudo dnf install python

してから、以下を実行しなおし

$ sudo chmod +x /usr/local/bin/docker-compose

なんや、簡単やん。
(なんだー、簡単じゃん。)

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?