dockerでイメージを取得する方法をご紹介します。
以下のように実行します。
1 |
# docker pull イメージ名 |
以下では、nginxのイメージを取得してみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@kumatora ~]# docker pull nginx latest: Pulling from nginx 76e2c5757307: Pull complete a908668a2685: Pull complete df93cca51b7c: Pull complete b000ec5736e2: Pull complete be2bb995d29d: Pull complete bc9469593da0: Pull complete f20d2872033d: Pull complete f0ab18764796: Pull complete 02b6bce7f317: Pull complete 2def01ae9e59: Pull complete Digest: sha256:a82bbaf63c445ee9b854d182254c62e34e6fa92f63d7b4fdf6cea7e76665e06e Status: Downloaded newer image for nginx:latest [root@kumatora ~]# |
「STATUS」が「Status: Downloaded newer image for nginx:latest」になっていれば取得成功です。
取得した一覧は以下のコマンドで確認できます。
1 |
# docker images |
nginxのイメージが取得できたかどうかを確認してみましょう。
1 2 3 4 |
[root@kumatora ~]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE nginx latest 2def01ae9e59 11 days ago 109.3 MB [root@kumatora ~]# |