我在樹梅派 ,作業系統為ubuntu 20.04,docker版本為20.10.2
下載ubuntu images
docker pull ubuntu
或是
docker run -ti ubuntu:20.04
查看了有哪些 images,ubuntu 有下載
pi@raspberrypi:~ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
eric19740521/apache03 latest 498efb6c7a0e 15 hours ago 213MB
ubuntu latest 612a7284cf7c 2 weeks ago 49.8MB
portainer/portainer latest dbf28ba50432 6 months ago 62.5MB
執行互動模式,docker run -ti ubuntu
date 查詢日期,發覺日期不是最新的
pi@raspberrypi:~ $ docker run -ti ubuntu
root@05a5540256da:/# ls
bin dev home media opt root sbin sys usr
boot etc lib mnt proc run srv tmp var
root@05a5540256da:/# date
Mon Mar 2 22:42:03 UTC 1970
apt update這個也會出錯
測試底下兩個images,是正常的
docker pull ubuntu:xenial-20210114
docker pull ubuntu:xenial
pi@raspberrypi:~ $ docker pull ubuntu:xenial
xenial: Pulling from library/ubuntu
2af2a813aac2: Already exists
470ef2a276bd: Already exists
b01c8ce931ce: Already exists
3b9ba02aed01: Already exists
Digest: sha256:e74994b7a9ec8e2129cfc6a871f3236940006ed31091de355578492ed140a39c
Status: Downloaded newer image for ubuntu:xenial
docker.io/library/ubuntu:xenial
pi@raspberrypi:~ $
pi@raspberrypi:~ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
eric19740521/apache03 latest 498efb6c7a0e 15 hours ago 213MB
ubuntu xenial 94880fe21137 2 weeks ago 104MB
ubuntu 20.04 612a7284cf7c 2 weeks ago 49.8MB
ubuntu latest 612a7284cf7c 2 weeks ago 49.8MB
portainer/portainer latest dbf28ba50432 6 months ago 62.5MB
pi@raspberrypi:~ $ docker run -ti ubuntu:xenial
root@943d4c854157:/# date
Thu Feb 4 03:16:26 UTC 2021
root@943d4c854157:/#