博文

目前显示的是 五月 28, 2023的博文

Portainer部署

图片
1.搜索portainer镜像 docker search portainer 2.拉取Portainer镜像 docker pull portainer / portainer - ce 3.启动Portainer容器 #启动镜像 docker run - d - p 9000 : 9000 --restart=always \ - v / var / run / docker . sock : / var / run / docker . sock \ --name portainer portainer/portainer-ce 4.查看容器列表及日志 docker ps docker logs - f portainer 解决安装portainer时的错误:“尝试拉动和启动portainer时出了点问题” 即 :{“ Something went wrong trying to pull and start portainer” } Zitat Docker storage :: /srv/dev-disk-by-uuid-c289a88e-31dc-4146-a254-1927f3a7b2c7/Docker Agent port:: 8000 Web port:: 9000 Yacht port:: 8001 ee:: 0 image:: portainer/portainer-ce arch :: amd64 option :: portainer state :: install extras :: 6.0.7 DNS OK. No portainer containers or images to remove. Pulling and starting portainer/portainer-ce ... d0672f9c4f33178e79766e07b9941366c1ecb40b386dea76c433ba25b143a945 Something went wrong trying to pull and start portainer ... 使用: apt install apparmor apparmor - utils auditd

Docker部署

图片
安装前的配置 1.设置存储库 更新apt包索引并安装包以允许apt通过 HTTPS 使用存储库: sudo apt - get update Lua Copy sudo apt - get install \ ca - certificates \ curl \ gnupg Lua Copy 2.添加 Docker 的官方 GPG 密钥: sudo install - m 0755 - d / etc / apt / keyrings curl - fsSL https : // download . docker . com / linux / debian / gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a + r / etc / apt / keyrings / docker . gpg Lua Copy 3.使用以下命令设置存储库: echo \ "deb [arch=" $ ( dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ "$(. /etc/os-release && echo " $VERSION_CODENAME ")" stable" | \ sudo tee / etc / apt / sources . list . d / docker . list > / dev / null Lua Copy 开始安装Docker (1).更新apt包索引: sudo apt - get update Lua Copy (2).安装 Docker Engine、containerd 和 Docker Compose sudo apt - get install docker - ce docker - ce - cli containerd . io docker - buildx - plugin docker - compose - pl