【Linux】Ubuntu 22.04 Docker インストール手順

Linux
スポンサーリンク

今回は、Ubuntu Server 22.04にパッケージマネージャーを使用してDockerをインストールしてHello Dockerをしてみたいと思います。

Dockerとは

Docker(ドッカー[4])は、OSレベルの仮想化を用いて、コンテナと呼ばれるパッケージでソフトウェアを提供するPaaS(Platform as a Service)製品群である[5]。このサービスには、無料ティアとプレミアムティアがある。コンテナをホストするソフトウェアは、Docker Engineと呼ばれる[6]。2013年に提供が開始され、Docker, Inc.が開発している[7]

Dockerは、アプリケーションがさまざまな環境で効率的に動作するように、軽量なコンテナでアプリケーションの展開を自動化するために使用されるツールである。

wikiより引用

Dockerは、仮想化の一種でOS上にアプリケーションを複数実行できる環境を構築し、そのうえでアプリケーションレイヤーで仮想化を行うソフトウェアです。
普段Hyper-VやVMware vSphereなどを使っていますが、こちらはOSレイヤで仮想化するため、仮想化を実行する部分が異なります。
インフラ屋さんはハイパーバイザー型仮想化が主で、ソフト屋さんはコンテナ型仮想化が主な感じがします。
ITの分野によって扱う仮想化のレイヤーが異なってきます。(もちろん、両方に知見があったほうが良い)

期待する目標

本手順で期待する目標は以下の通りです。

  • Ubuntu Server 22.04にDockerをインストールできる
  • Hellow Dockerができる

前提条件

本手順で使用する環境は以下の通りです。今回はUbuntu Server 22.04はHyper-V上に構築しています。

  • CPU : 2vCPU
  • MEM : 4GB
  • DISK : 60GB
  • OS : Ubuntu Server 22.04

Ubuntu 22.04上にDockerを構築する方法で一番簡単なのは、OSのインストール時に同梱するように構築するにが一番簡単ですが、今回はAPTを使用してインストールしていきます。

Dockerインストール

初めに、DockerをインストールするOSの情報を表示しておきます。

willserver@dev-docker:~$ cat /etc/ops-release 
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

インストール後にAPTでパッケージをアップデートしていきます。

willserver@dev-docker:~$ sudo apt update

Dockerをインストールする前に前提となるパッケージをインストールしていきます。

willserver@dev-docker:~$ sudo apt install ca-certificates curl gnupg lsb-release

Reading package lists... 0%Reading package lists... 100%Reading package lists... Done
Building dependency tree... 0%Building dependency tree... 0%Building dependency tree... 50%Building dependency tree... 50%Building dependency tree... Done
Reading state information... 0% Reading state information... 0%Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
lsb-release set to manually installed.
ca-certificates is already the newest version (20211016ubuntu0.22.04.1).
ca-certificates set to manually installed.
curl is already the newest version (7.81.0-1ubuntu1.7).
curl set to manually installed.
gnupg is already the newest version (2.2.27-3ubuntu2.1).
gnupg set to manually installed.
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 libintl-perl libintl-xs-perl libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl libsort-naturally-perl libterm-readkey-perl
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
willserver@dev-docker:~$ 

前提パッケージのインストールが完了したら、GnuPGのダウンロードを行います。

willserver@dev-docker:~$ sudo mkdir -p /etc/apt/keyringssudo mkdir -p /etc/apt/keyrings
willserver@dev-docker:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
willserver@dev-docker:~$ ls /etc/apt/keyrings/
docker.gpg
willserver@dev-docker:~$

GnuPGのダウンロードが完了したら、GnuPGのセットアップを行っていきます。

willserver@dev-docker:~$
willserver@dev-docker:~$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
willserver@dev-docker:~$

GnuPGの設定が完了したら、パッケージのアップデートを行います。

willserver@dev-docker:~$ sudo apt update
0% [Working]            Get:1 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB]
0% [Connecting to jp.archive.ubuntu.com] [1 InRelease 0 B/48.9 kB 0%]                                                                     0% [Connecting to jp.archive.ubuntu.com]0% [Connecting to jp.archive.ubuntu.com]                                        Get:2 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages [12.7 kB]
0% [Connecting to jp.archive.ubuntu.com] [2 Packages 12.7 kB/12.7 kB 100%]                                                                          0% [Connecting to jp.archive.ubuntu.com]0% [2 Packages store 0 B] [Connecting to jp.archive.ubuntu.com]                                                               0% [Connecting to jp.archive.ubuntu.com]                                        0% [Waiting for headers]                        Hit:3 http://jp.archive.ubuntu.com/ubuntu jammy InRelease
                        0% [Working]0% [Waiting for headers]                        Hit:4 http://jp.archive.ubuntu.com/ubuntu jammy-updates InRelease
                        0% [Working]0% [Waiting for headers]                        Hit:5 http://jp.archive.ubuntu.com/ubuntu jammy-backports InRelease
0% [Waiting for headers]0% [Waiting for headers]                        Hit:6 http://jp.archive.ubuntu.com/ubuntu jammy-security InRelease
                        0% [Working]100% [Working]              Fetched 61.6 kB in 2s (35.7 kB/s)
Reading package lists... 0%Reading package lists... 0%Reading package lists... 0%Reading package lists... 4%Reading package lists... 4%Reading package lists... 6%Reading package lists... 6%Reading package lists... 7%Reading package lists... 7%Reading package lists... 7%Reading package lists... 7%Reading package lists... 52%Reading package lists... 52%Reading package lists... 73%Reading package lists... 73%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 74%Reading package lists... 78%Reading package lists... 78%Reading package lists... 80%Reading package lists... 80%Reading package lists... 82%Reading package lists... 82%Reading package lists... 83%Reading package lists... 83%Reading package lists... 87%Reading package lists... 87%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 88%Reading package lists... 90%Reading package lists... 90%Reading package lists... 90%Reading package lists... 92%Reading package lists... 92%Reading package lists... 94%Reading package lists... 94%Reading package lists... 95%Reading package lists... 95%Reading package lists... 98%Reading package lists... 98%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... 99%Reading package lists... Done
Building dependency tree... 0%Building dependency tree... 0%Building dependency tree... 0%Building dependency tree... 50%Building dependency tree... 50%Building dependency tree... Done
Reading state information... 0% Reading state information... 0%Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
willserver@dev-docker:~$

パッケージのアップデートが完了したら、Dockerをインストールを行います。

willserver@dev-docker:~$ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Reading package lists... 0%Reading package lists... 100%Reading package lists... Done
Building dependency tree... 0%Building dependency tree... 0%Building dependency tree... 50%Building dependency tree... 50%Building dependency tree... Done
Reading state information... 0% Reading state information... 0%Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 libintl-perl libintl-xs-perl libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl libsort-naturally-perl libterm-readkey-perl
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  docker-buildx-plugin docker-ce-rootless-extras docker-scan-plugin libltdl7 libslirp0 pigz slirp4netns
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite
The following NEW packages will be installed:
  containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin docker-scan-plugin libltdl7 libslirp0 pigz slirp4netns
0 upgraded, 11 newly installed, 0 to remove and 3 not upgraded.
Need to get 111 MB of archives.
After this operation, 397 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
0% [Working]            Get:1 https://download.docker.com/linux/ubuntu jammy/stable amd64 containerd.io amd64 1.6.16-1 [27.7 MB]
0% [Connecting to jp.archive.ubuntu.com (185.125.190.39)] [1 containerd.io 15.9 kB/27.7 MB 0%]                                                                                              4% [Waiting for headers] [1 containerd.io 5,619 kB/27.7 MB 20%]                                                               8% [Waiting for headers] [1 containerd.io 11.5 MB/27.7 MB 41%]12% [Waiting for headers] [1 containerd.io 17.3 MB/27.7 MB 62%]17% [Waiting for headers] [1 containerd.io 23.1 MB/27.7 MB 83%]                                                               22% [Waiting for headers]                         Get:2 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-buildx-plugin amd64 0.10.2-1~ubuntu.22.04~jammy [25.9 MB]
22% [Waiting for headers] [2 docker-buildx-plugin 15.9 kB/25.9 MB 0%]26% [Waiting for headers] [2 docker-buildx-plugin 5,849 kB/25.9 MB 23%]                                                                       30% [Waiting for headers] [2 docker-buildx-plugin 11.7 MB/25.9 MB 45%]                                                                      Get:3 http://jp.archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]
33% [3 pigz 3,925 B/63.6 kB 6%] [2 docker-buildx-plugin 15.8 MB/25.9 MB 61%]37% [3 pigz 50.2 kB/63.6 kB 79%] [2 docker-buildx-plugin 21.6 MB/25.9 MB 83%]                                                                             40% [2 docker-buildx-plugin 22.3 MB/25.9 MB 86%]                                                Get:4 http://jp.archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64 2.4.6-15build2 [39.6 kB]
42% [4 libltdl7 2,523 B/39.6 kB 6%] [2 docker-buildx-plugin 25.0 MB/25.9 MB 97%]                                                                                44% [4 libltdl7 33.4 kB/39.6 kB 84%]                                    Get:5 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-cli amd64 5:23.0.0-1~ubuntu.22.04~jammy [13.2 MB]
44% [4 libltdl7 36.2 kB/39.6 kB 91%] [5 docker-ce-cli 15.9 kB/13.2 MB 0%]                                                                         46% [5 docker-ce-cli 196 kB/13.2 MB 1%]                                       Get:6 http://jp.archive.ubuntu.com/ubuntu jammy/main amd64 libslirp0 amd64 4.6.1-1build1 [61.5 kB]
46% [6 libslirp0 1,916 B/61.5 kB 3%] [5 docker-ce-cli 196 kB/13.2 MB 1%]                                                                        50% [5 docker-ce-cli 2,310 kB/13.2 MB 18%]                                          Get:7 http://jp.archive.ubuntu.com/ubuntu jammy/universe amd64 slirp4netns amd64 1.0.1-2 [28.2 kB]
50% [7 slirp4netns 427 B/28.2 kB 2%] [5 docker-ce-cli 2,322 kB/13.2 MB 18%]                                                                           52% [5 docker-ce-cli 3,178 kB/13.2 MB 24%]56% [5 docker-ce-cli 9,027 kB/13.2 MB 69%]                                          61% [Waiting for headers]                         Get:8 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce amd64 5:23.0.0-1~ubuntu.22.04~jammy [22.0 MB]
61% [8 docker-ce 15.9 kB/22.0 MB 0%]65% [8 docker-ce 5,816 kB/22.0 MB 26%]                                                                                                                                                                                          11.4 MB/s 3s69% [8 docker-ce 10.4 MB/22.0 MB 47%]                                                                                                                                                                                           11.4 MB/s 2s72% [8 docker-ce 14.6 MB/22.0 MB 67%]                                                                                                                                                                                           11.4 MB/s 2s75% [8 docker-ce 20.0 MB/22.0 MB 91%]                                                                                                                                                                                           11.4 MB/s 2s79% [Waiting for headers]                                                                                                                                                                                                       11.4 MB/s 1s                                                                                                                                                                                                                                            Get:9 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-rootless-extras amd64 5:23.0.0-1~ubuntu.22.04~jammy [8,759 kB]
79% [9 docker-ce-rootless-extras 15.9 kB/8,759 kB 0%]                                                                                                                                                                           11.4 MB/s 1s83% [9 docker-ce-rootless-extras 5,849 kB/8,759 kB 67%]                                                                                                                                                                         11.4 MB/s 1s87% [Waiting for headers]                                                                                                                                                                                                       11.4 MB/s 1s                                                                                                                                                                                                                                            Get:10 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-compose-plugin amd64 2.15.1-1~ubuntu.22.04~jammy [9,570 kB]
87% [10 docker-compose-plugin 15.9 kB/9,570 kB 0%]                                                                                                                                                                              11.4 MB/s 1s91% [10 docker-compose-plugin 5,832 kB/9,570 kB 61%]                                                                                                                                                                            11.4 MB/s 0s96% [Waiting for headers]                                                                                                                                                                                                       11.4 MB/s 0s                                                                                                                                                                                                                                            Get:11 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-scan-plugin amd64 0.23.0~ubuntu-jammy [3,623 kB]
96% [11 docker-scan-plugin 15.9 kB/3,623 kB 0%]                                                                                                                                                                                 11.4 MB/s 0s100% [Working]                                                                                                                                                                                                                  11.4 MB/s 0s                                                                                                                                                                                                                                            Fetched 111 MB in 10s (11.2 MB/s)

Selecting previously unselected package pigz.
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 73733 files and directories currently installed.)
Preparing to unpack .../00-pigz_2.6-1_amd64.deb ...
Progress: [  0%] [.......................................................................................................................................................................................................................] Progress: [  2%] [####...................................................................................................................................................................................................................] Unpacking pigz (2.6-1) ...
Progress: [  4%] [#########..............................................................................................................................................................................................................] Selecting previously unselected package containerd.io.
Preparing to unpack .../01-containerd.io_1.6.16-1_amd64.deb ...
Progress: [  7%] [##############.........................................................................................................................................................................................................] Unpacking containerd.io (1.6.16-1) ...
Progress: [  9%] [###################....................................................................................................................................................................................................] Selecting previously unselected package docker-buildx-plugin.
Preparing to unpack .../02-docker-buildx-plugin_0.10.2-1~ubuntu.22.04~jammy_amd64.deb ...
Progress: [ 11%] [#######################................................................................................................................................................................................................] Unpacking docker-buildx-plugin (0.10.2-1~ubuntu.22.04~jammy) ...
Progress: [ 13%] [############################...........................................................................................................................................................................................] Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../03-docker-ce-cli_5%3a23.0.0-1~ubuntu.22.04~jammy_amd64.deb ...
Progress: [ 16%] [#################################......................................................................................................................................................................................] Unpacking docker-ce-cli (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 18%] [######################################.................................................................................................................................................................................] Selecting previously unselected package docker-ce.
Preparing to unpack .../04-docker-ce_5%3a23.0.0-1~ubuntu.22.04~jammy_amd64.deb ...
Progress: [ 20%] [###########################################............................................................................................................................................................................] Unpacking docker-ce (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 22%] [###############################################........................................................................................................................................................................] Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../05-docker-ce-rootless-extras_5%3a23.0.0-1~ubuntu.22.04~jammy_amd64.deb ...
Progress: [ 24%] [####################################################...................................................................................................................................................................] Unpacking docker-ce-rootless-extras (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 27%] [#########################################################..............................................................................................................................................................] Selecting previously unselected package docker-compose-plugin.
Preparing to unpack .../06-docker-compose-plugin_2.15.1-1~ubuntu.22.04~jammy_amd64.deb ...
Progress: [ 29%] [##############################################################.........................................................................................................................................................] Unpacking docker-compose-plugin (2.15.1-1~ubuntu.22.04~jammy) ...
Progress: [ 31%] [##################################################################.....................................................................................................................................................] Selecting previously unselected package docker-scan-plugin.
Preparing to unpack .../07-docker-scan-plugin_0.23.0~ubuntu-jammy_amd64.deb ...
Progress: [ 33%] [#######################################################################................................................................................................................................................] Unpacking docker-scan-plugin (0.23.0~ubuntu-jammy) ...
Progress: [ 36%] [############################################################################...........................................................................................................................................] Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../08-libltdl7_2.4.6-15build2_amd64.deb ...
Progress: [ 38%] [#################################################################################......................................................................................................................................] Unpacking libltdl7:amd64 (2.4.6-15build2) ...
Progress: [ 40%] [######################################################################################.................................................................................................................................] Selecting previously unselected package libslirp0:amd64.
Preparing to unpack .../09-libslirp0_4.6.1-1build1_amd64.deb ...
Progress: [ 42%] [##########################################################################################.............................................................................................................................] Unpacking libslirp0:amd64 (4.6.1-1build1) ...
Progress: [ 44%] [###############################################################################################........................................................................................................................] Selecting previously unselected package slirp4netns.
Preparing to unpack .../10-slirp4netns_1.0.1-2_amd64.deb ...
Progress: [ 47%] [####################################################################################################...................................................................................................................] Unpacking slirp4netns (1.0.1-2) ...
Progress: [ 49%] [#########################################################################################################..............................................................................................................] Setting up docker-scan-plugin (0.23.0~ubuntu-jammy) ...
Progress: [ 51%] [#############################################################################################################..........................................................................................................] Progress: [ 53%] [##################################################################################################################.....................................................................................................] Setting up docker-buildx-plugin (0.10.2-1~ubuntu.22.04~jammy) ...
Progress: [ 56%] [#######################################################################################################################................................................................................................] Progress: [ 58%] [############################################################################################################################...........................................................................................] Setting up containerd.io (1.6.16-1) ...
Progress: [ 60%] [#################################################################################################################################......................................................................................] Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Progress: [ 62%] [#####################################################################################################################################..................................................................................] Setting up docker-compose-plugin (2.15.1-1~ubuntu.22.04~jammy) ...
Progress: [ 64%] [##########################################################################################################################################.............................................................................] Progress: [ 67%] [###############################################################################################################################################........................................................................] Setting up libltdl7:amd64 (2.4.6-15build2) ...
Progress: [ 69%] [####################################################################################################################################################...................................................................] Progress: [ 71%] [########################################################################################################################################################...............................................................] Setting up docker-ce-cli (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 73%] [#############################################################################################################################################################..........................................................] Progress: [ 76%] [##################################################################################################################################################################.....................................................] Setting up libslirp0:amd64 (4.6.1-1build1) ...
Progress: [ 78%] [#######################################################################################################################################################################................................................] Progress: [ 80%] [############################################################################################################################################################################...........................................] Setting up pigz (2.6-1) ...
Progress: [ 82%] [################################################################################################################################################################################.......................................] Progress: [ 84%] [#####################################################################################################################################################################################..................................] Setting up docker-ce-rootless-extras (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 87%] [##########################################################################################################################################################################################.............................] Progress: [ 89%] [###############################################################################################################################################################################################........................] Setting up slirp4netns (1.0.1-2) ...
Progress: [ 91%] [###################################################################################################################################################################################################....................] Progress: [ 93%] [########################################################################################################################################################################################################...............] Setting up docker-ce (5:23.0.0-1~ubuntu.22.04~jammy) ...
Progress: [ 96%] [#############################################################################################################################################################################################################..........] Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Progress: [ 98%] [##################################################################################################################################################################################################################.....] Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

willserver@dev-docker:~$ 
willserver@dev-docker:~$ docker -v
Docker version 23.0.0, build e92dd87

以上でDockerのインストールは完了です。
2023/2/8時点では、Docker 23.0.0がリポジトリの最新バージョンらしいです。
Dockerのインストールが完了したら、Hello DockerをしてDockerに挨拶をしたいと思います。

willserver@dev-docker:~$
willserver@dev-docker:~$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world

2db29710123e: Pulling fs layer 2db29710123e: Downloading [===============>                                   ]     757B/2.479kB2db29710123e: Downloading [==================================================>]  2.479kB/2.479kB2db29710123e: Verifying Checksum 2db29710123e: Download complete 2db29710123e: Extracting [==================================================>]  2.479kB/2.479kB2db29710123e: Extracting [==================================================>]  2.479kB/2.479kB2db29710123e: Pull complete Digest: sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
Status: Downloaded newer image for hello-world:latest

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

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

willserver@dev-docker:~$ 

hello-worldのDockerをrunしたら、[Hello from Docker!]と表示されます。
以上でDockerへのご挨拶は完了です。

まとめ

今回はUbuntu Server 22.04にDockerをインストールしてみました。
Dockerはインストールしておくと、様々なアプリケーションを簡単に展開できるので、非常に便利だと思います。
また、Docker以外にもコンテナ管理ツールは複数あり、[Kubernetes]や[OpenShift]などがあります。
さらには、GCPやAWS、Azureなどのクライドにもコンテナはあるので、そちらでもコンテナを使ってみるのもよいと思います。

おまけ

本ブログではVMwareやWindows、Linuxのインストール手順等も公開しております。
インフラエンジニアとして有益な記事や無益なコンテンツも作成しておりますので、通勤時間や休憩時間、休日のスキマ時間等に合わせて読んでいただけると幸いです。
また、Youtubeで解説動画も鋭意作成中です。本ブログで記事にしているものも動画にしようと思っておりますので、よろしくお願いいたします。
willserverのnoteも開設したのでフォローお願いします。

コメント

タイトルとURLをコピーしました