Try   HackMD

Docker 很簡單-安裝現成的image

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
回筆記首頁

tags: docker python

安裝docker

在cento linux中執行 yum install docker 即可
基本指令
docker search :搜尋images
docker pull :下載images
docker images :顯示已下載Images
docker run :啟動image的OS並實體化Container
docker ps :顯示已實體化的Container

搜尋images並安裝

執行docker search python就能看到有哪些images可以下載
也可以到 hub.docker.com找你要的image。

我這次要安裝 3.12-alpine3.17,指令是docker pull python:3.11.1-alpine3.17 下載之後可以用docker images看看是否出現你下載的images.

$docker images
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
REPOSITORY                TAG                IMAGE ID      CREATED     SIZE
docker.io/library/python  3.11.1-alpine3.17  18ccdc39ea28  2 days ago  55.4 MB

如果有,馬上執行試試看$ docker run -it ubuntu /bin/bash

Author:

  • 林奇賢