Page:
Service:Docker
Pages
修改成台北時區
將PCIe直通給PVE的虛擬機
延展系統硬碟
憑證 x509 問題
進入 busybox 問題
53 埠被占用
Claude:ccstatusline
Database:PostgreSQL
Database:SQLServer
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block
Service:ASP.NET
Service:Coder
Service:Docker
Service:ElasticSearch
Service:Emby
Service:Gitea
Service:GiteaRunner
Service:Gitlab
Service:MeTube
Service:OpenClaw
Service:OpenCode
Service:PicoClaw
Service:Redis
Service:Traefik
Service:VS Code
Service:Vaultwarden
Service:ezBookkeeping
Service:k3d
Service:netplan
Tool:C# SDK
Tool:Node JS
Tool:Oh My Posh
Clone
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
簡介
Docker 是容器化平台,用於封裝與執行應用程式。本文記錄在 Ubuntu 上安裝 Docker 與 Docker Compose 的步驟,以及在 PVE 容器(CT)中常見的問題排解。
安裝 Docker
安裝 Docker 引擎與 Docker Compose v2 外掛。
apt update && apt install -y docker.io docker-compose-v2
將 Docker 權限賦予目前的使用者
將目前使用者加入 docker 群組,之後即可免 sudo 操作 Docker。
usermod -aG docker $USER
不重新登入即套用新群組(僅對當前 shell 生效)。
newgrp docker
常見問題
問題一:PVE 的 CT 安裝後無法啟動容器
(2015/12/05) 在 PVE 的 LXC 容器中啟動 Docker 容器時出現以下錯誤:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
解決方法
在 PVE 宿主機上編輯該 CT 的設定檔,加上相容設定。
nano /etc/pve/lxc/(CT ID).conf
加上以下內容後重啟該 CT:
lxc.apparmor.profile: unconfined
lxc.mount.entry: /dev/null sys/module/apparmor/parameters/enabled none bind 0 0
lxc.mount.entry: /proc/sys/net/ipv4/ip_unprivileged_port_start proc/sys/net/ipv4/ip_unprivileged_port_start none bind 0 0