Ubuntu 20.04 在 4 月 23 日正式發行,發行版代號為 Focal Fossa,Linux Kernel 為 5.4。這次除了在安全性與性能上再次提升外,在檔案系統的部分,這次原生支援了 exFAT,並改善 ZFS 檔案系統的相容性。

現在使用 container 的需求量很大,安裝完後的第一件事情就是馬上來裝個 Docker,follow 官方的標準安裝流程:

sudo apt-get remove -y docker docker-engine docker.io containerd runc; \
sudo apt-get update && \
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable" && \
sudo apt-get update && \
sudo apt-get install -y docker-ce docker-ce-cli containerd.io

這時候問題來了,做到 add-apt-repository 這段的時候會出錯:

Hit:1 http://tw.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://tw.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://tw.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://tw.archive.ubuntu.com/ubuntu focal-security InRelease
Ign:5 https://download.docker.com/linux/ubuntu focal InRelease
Err:6 https://download.docker.com/linux/ubuntu focal Release
  404  Not Found [IP: 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

為什麼呢?因為 20.04 才剛發布,Docker repository 還沒這麼快更新。直接到 mirror 的網頁目錄看,focal 並沒有出現。


但是不用擔心,因為新版發布時,內建的 packages info 中收錄的絕大多數軟體都非常的新,基本上跟你自己抓的差不了多少。

執行 apt show docker.io 查看 Docker 版本:

Package: docker.io
Version: 19.03.8-0ubuntu1
Built-Using: glibc (= 2.31-0ubuntu4)
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Paul Tagliamonte <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 192 MB
Depends: adduser, containerd (>= 1.2.6-0ubuntu1~), iptables, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.8), libdevmapper1.02.1 (>= 2:1.02.97), libseccomp2 (>= 2.1.0), libsystemd0 (>= 209~)
Recommends: ca-certificates, cgroupfs-mount | cgroup-lite, git, pigz, ubuntu-fan, xz-utils, apparmor
Suggests: aufs-tools, btrfs-progs, debootstrap, docker-doc, rinse, zfs-fuse | zfsutils
Breaks: docker (<< 1.5~)
Replaces: docker (<< 1.5~)
Homepage: https://www.docker.com/community-edition
Download-Size: 38.9 MB
APT-Manual-Installed: yes
APT-Sources: http://free.nchc.org.tw/ubuntu focal/universe amd64 Packages
Description: Linux container runtime
 Docker complements kernel namespacing with a high-level API which operates at
 the process level. It runs unix processes with strong guarantees of isolation
 and repeatability across servers.
 Docker is a great building block for automating distributed systems:
 large-scale web deployments, database clusters, continuous deployment systems,
 private PaaS, service-oriented architectures, etc.
 This package contains the daemon and client. Using docker.io on non-amd64 hosts
 is not supported at this time. Please be careful when using it on anything
 besides amd64.
 Also, note that kernel version 3.8 or above is required for proper operation of
 the daemon process, and that any lower versions may have subtle and/or glaring

目前的最新發行版也是 19.03.8


執行 apt show docker-compose 查看 Docker Compose 版本:

Package: docker-compose
Version: 1.25.0-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Docker Compose Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 667 kB
Depends: python3-cached-property (>= 1.2.0), python3-docker (>= 4.0.0), python3-dockerpty (>= 0.4.1), python3-docopt (>= 0.6.1), python3-jsonschema, python3-requests (>= 2.20.0), python3-six (<< 2), python3-six (>= 1.3.0), python3-texttable (>= 0.9.0), python3-websocket (>= 0.32.0), python3-yaml (>= 3.10), python3:any (>= 3.6~), python3-distutils
Recommends: docker.io (>= 1.9.0)
Homepage: https://docs.docker.com/compose/
Download-Size: 92.7 kB
APT-Manual-Installed: yes
APT-Sources: http://free.nchc.org.tw/ubuntu focal/universe amd64 Packages
Description: Punctual, lightweight development environments using Docker
 docker-compose is a service management software built on top of docker. Define
 your services and their relationships in a simple YAML file, and let compose
 handle the rest.

Docker Compose 不是最新版,但其實也就只有 patch 版號有差而已,minor 是一樣的,不構成問題。



sudo apt install -y docker.io docker-compose


[email protected]:~$ sudo docker info
 Debug Mode: false

 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 19.03.8
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version:
 runc version:
 init version:
 Security Options:
   Profile: default
 Kernel Version: 5.4.0-26-generic
 Operating System: Ubuntu 20.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.817GiB
 Name: ubuntu-server-focal
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
 Live Restore Enabled: false

WARNING: No swap limit support

[email protected]:~$ sudo docker-compose -v
docker-compose version 1.25.0, build unknown


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料