使用Ubuntu 20.04,我很早之前就已经安装了docker、docker-desktop和docker-compose。现在,我想清理电脑中的一些存储并识别大文件,发现.docker
我的主目录中的文件夹位于68 GB
存储中。
我很快就跑遍docker system prune -a
了我的两个上下文(所有数据都已过时且对我来说毫无用处),并且大小仍然相同。我从未下载过任何如此大小的容器。
我可以卸载所有相关软件包并手动删除该文件夹,但我想知道其根本原因以及如何解决此问题。
使用Ubuntu 20.04,我很早之前就已经安装了docker、docker-desktop和docker-compose。现在,我想清理电脑中的一些存储并识别大文件,发现.docker
我的主目录中的文件夹位于68 GB
存储中。
我很快就跑遍docker system prune -a
了我的两个上下文(所有数据都已过时且对我来说毫无用处),并且大小仍然相同。我从未下载过任何如此大小的容器。
我可以卸载所有相关软件包并手动删除该文件夹,但我想知道其根本原因以及如何解决此问题。
我正在运行 Ubuntu 20.04,并使用 Nvidia Riva 自动语音识别应用程序来检测语音命令。我想将它们引导/管道到另一个应用程序中以执行控制操作。我遇到的问题是 ASR 应用程序部署在 Docker 容器中,而控制应用程序则不是。
所以。我想知道在 docker 容器外部运行的应用程序如何与在容器内部运行的应用程序交互。
我考虑过在同一个容器中运行所有内容,但是这是不切实际的,因为我们的产品已经成熟,有很多相互交互的服务,并且还有与 Linux 内核驱动程序的接口。
预先感谢您的任何帮助。
运行 Ubuntu 服务器 22.04.4 LTS。
今天我做了一个apt update
并apt upgrade
进行了一些更新,然后我通过docker-compose pull
. 在我尝试通过 docker-compose 重新启动容器后,我收到了一系列有关容器配置的错误,并且许多容器拒绝启动。然后,当我运行时docker ps -a
,我看到一堆容器名称已更改为在先前名称之前包含随机字符串(例如 swag 现在为 5f6bfe94c235_swag)。我没有更改docker-compose.yml
文件中的任何内容,并且在此之前它一直运行良好。
当我运行时sudo docker-compose up -d
,我得到以下输出:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 203, in perform_command
handler(command, command_options)
File "/usr/lib/python3/dist-packages/compose/metrics/decorator.py", line 18, in wrapper
result = fn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1186, in up
to_attach = up(False)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1166, in up
return self.project.up(
File "/usr/lib/python3/dist-packages/compose/project.py", line 697, in up
results, errors = parallel.parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/project.py", line 679, in do
return service.execute_convergence_plan(
File "/usr/lib/python3/dist-packages/compose/service.py", line 579, in execute_convergence_plan
return self._execute_convergence_recreate(
File "/usr/lib/python3/dist-packages/compose/service.py", line 499, in _execute_convergence_recreate
containers, errors = parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/service.py", line 494, in recreate
return self.recreate_container(
File "/usr/lib/python3/dist-packages/compose/service.py", line 612, in recreate_container
new_container = self.create_container(
File "/usr/lib/python3/dist-packages/compose/service.py", line 330, in create_container
container_options = self._get_container_create_options(
File "/usr/lib/python3/dist-packages/compose/service.py", line 921, in _get_container_create_options
container_options, override_options = self._build_container_volume_options(
File "/usr/lib/python3/dist-packages/compose/service.py", line 960, in _build_container_volume_options
binds, affinity = merge_volume_bindings(
File "/usr/lib/python3/dist-packages/compose/service.py", line 1548, in merge_volume_bindings
old_volumes, old_mounts = get_container_data_volumes(
File "/usr/lib/python3/dist-packages/compose/service.py", line 1579, in get_container_data_volumes
container.image_config['ContainerConfig'].get('Volumes') or {}
KeyError: 'ContainerConfig'
我可以使用以下命令手动启动容器:
sudo docker start <container_name>
重启docker服务并重启电脑都没有解决。知道这次更新出了什么问题以及如何修复它吗?
我是一名尝试安装和运行 Frigate 的新手。当尝试 docker run 命令时,它会加载一点,然后在准备 gotrtc 配置时生成“文件未找到”错误消息。
在我的 Docker-compose 文件中,我有: - /home/fred/frigate/config.yml:/config/config.yml:ro
是否找不到引用此行或其他内容的文件?
乌班图22.04
我正在尝试按照本指南https://help.ubuntu.com/community/KVM/Installation设置 KVM ,不幸的是,当我运行 kvm-ok 时,出现以下错误
Command 'kvm-ok' not found, but can be installed with:
sudo apt install cpu-checker
然后我尝试安装 cpu-checker 并给出了这个错误
cpu-checker : Depends: msr-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我已经在 BIOS (AMD Ryzen7 GFX CPU) 中启用了虚拟化,并且尝试了 --fix-broken 安装。
kvm 是安装 Docker Desktop 的要求,这就是我想要工作的,有谁知道如何解决这个问题,以便我可以让 kvm/Docker 工作?
安装的存储库
它表明这个问题是由存储库冲突引起的,但是如何找出罪魁祸首呢?我为音频应用程序 (kxstudio)、Brave 浏览器、Wine、Proton、VSCode 和 Chrome 安装了一些存储库。它们都是在过去几个月内安装的。(系统是3个月前重建的)
sudo grep -rhE ^deb /etc/apt/sources.list*
deb http://gb.archive.ubuntu.com/ubuntu/ jammy main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ jammy universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates universe
deb http://gb.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ jammy main
deb https://ppa.launchpadcontent.net/flatpak/stable/ubuntu/ jammy main
deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/music/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu bionic main
deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu bionic main
deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu focal main
deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu focal main
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
deb [arch="all", signed-by=/usr/share/keyrings/protonvpn-stable-archive-keyring.gpg] https://repo.protonvpn.com/debian stable main
谢谢杰夫
我已经在笔记本电脑上安装了新的 kubuntu 22.04,当我尝试安装 docker 时,我已经安装了 docker-ce 和 docker-compose :
root@serge-at-home:/mnt/_work_sdb8/wwwroot/lar/MngProducts# dpkg -s docker-compose
Package: docker-compose
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 498
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Version: 1.29.2-1
Depends: python3-cached-property (>= 1.2.0) | python3 (>> 3.8), python3-distro (>= 1.5.0), python3-docker (>= 5), python3-dockerpty (>= 0.4.1), python3-docopt (>= 0.6.1), python3-dotenv (>= 0.13.0), python3-jsonschema, python3-requests (>= 2.20.0), python3-texttable (>= 0.9.0), python3-websocket (>= 0.32.0), python3-yaml (>= 3.10), python3:any, python3-distutils
Recommends: docker.io (>= 1.9.0)
Description: define and run multi-container Docker applications with YAML
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.
Original-Maintainer: Docker Compose Team <[email protected]>
Homepage: https://docs.docker.com/compose/
root@serge-at-home:/mnt/_work_sdb8/wwwroot/lar/MngProducts# dpkg -s docker-ce
Package: docker-ce
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 94347
Maintainer: Docker <[email protected]>
Architecture: amd64
Version: 5:24.0.6-1~ubuntu.22.04~jammy
Replaces: docker-engine
Depends: containerd.io (>= 1.6.4), docker-ce-cli, iptables, libseccomp2 (>= 2.3.0), libc6 (>= 2.34), libdevmapper1.02.1 (>= 2:1.02.97), libsystemd0
Recommends: apparmor, ca-certificates, docker-ce-rootless-extras, git, libltdl7, pigz, procps, xz-utils
Suggests: aufs-tools, cgroupfs-mount | cgroup-lite
Conflicts: docker (<< 1.5~), docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
Conffiles:
/etc/default/docker 01f06689327cb8ded58332709d28670c
/etc/init.d/docker 4cd80dac70f6019cb5a9c36c38f2e8d2
Description: Docker: the open-source application container engine
Docker is a product for you to build, ship and run any application as a
lightweight container
.
Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest cloud compute instance and
everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
Homepage: https://www.docker.com
root@serge-at-home:/mnt/_work_sdb8/wwwroot/lar/MngProducts# uname -a
Linux serge-at-home 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
我已经运行命令:
sudo chmod +x /usr/bin/docker-compose
没有错误。
但是在我的项目上运行 docker 时我收到了“权限被拒绝”错误
serge@serge-at-home:/_wwwroot/lar/FilamentBanners/__DOCKER$ docker-compose up -d --build
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
我也运行命令:
usermod -aG docker $USER
和
newgrp - docke
但无论如何还是同样的错误...我在安装过程中错过了什么?
我今天(10 月 10 日)使用以下命令安装了 docker:
sudo apt install docker-buildx
(latest version 0.11.2-0ubuntu1~22.04.1)
它安装了 docker.io 包等。我看到 docker --version 返回
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
我知道有以下错误阻止了 Ubuntu 22.04 上的新 24.0.5,但根据 launchapd 已修复:https ://bugs.launchpad.net/ubuntu/+source/docker-buildx/+bug/1968035
现在我正在尝试从官方 Docker PPA 运行我的脚本,该脚本在 docker 上完美运行,但在 Ubuntu 中的 apt 版本的 docker 24.0.5 中失败:
docker compose --parallel 1 -f "my_file" down
unknown flag: --parallel
See 'docker --help'.
我正在检查 docker 的官方文档,我发现那里提到了该标志,所以它不应该抱怨: https ://docs.docker.com/compose/reference/
我缺少什么?我只想使用 docker 从 Ubuntu 中一键安装,而不需要 PPA 恶作剧。另外,我需要 docker 24+,因此降级到较旧的 20.xx 版本对我来说不起作用。
我在 Ubuntu 23.04 上安装了 Docker 20.10.21。我也跑过
export DOCKER_CLI_EXPERIMENTAL=enabled
但是,当我跑步时docker buildx
,我得到
docker: 'buildx' is not a docker command.
See 'docker --help'
我的印象是,在 Debian 风格的操作系统上,buildx 是随docker.io
软件包一起安装的。我如何让这个工作?
docker version
节目
Client:
Version: 20.10.21
API version: 1.41
Go version: go1.20.1
Git commit: 20.10.21-0ubuntu3
Built: Tue Feb 28 14:28:22 2023
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.20.1
Git commit: 20.10.21-0ubuntu3
Built: Tue Feb 28 12:17:52 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.12-0ubuntu3
GitCommit:
runc:
Version: 1.1.4-0ubuntu3
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
我正在尝试从以下 dockerfile 构建一个 docker 镜像:
FROM ubuntu:18.04
# Install Python
RUN apt-get update && apt-get install -y python3.10 python3-pip
# Install Java
RUN apt-get update && apt-get install -y openjdk-8-jdk
# Install Bowtie2
RUN apt-get update && apt-get install -y bowtie2
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
# Install RSeQC
RUN apt-get update && apt-get install -y python-pip
RUN pip install RSeQC
# Install biopython=1.80
RUN pip install biopython
# Install Atria
RUN apt-get update && apt-get install -y wget
RUN wget https://github.com/cihga39871/Atria/releases/download/v3.1.2/atria-3.1.2-linux.tar.gz
RUN tar -zxf atria-3.1.2-linux.tar.gz
RUN mv atria-3.1.2/bin/atria /usr/local/bin/atria
RUN chmod +x /usr/local/bin/atria
##Atria dependencies
RUN apt-get update && apt-get install pigz pbzip2
# Install findtail
RUN apt-get update && apt-get install -y wget
RUN wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/findtail/findtail_v1.01
RUN mv findtail_v1.01 /usr/local/bin/findtail_v1.01
RUN chmod +x /usr/local/bin/findtail_v1.01
当我尝试构建图像时,它卡在了:
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area: 6
它会永远卡在那里,直到我按 ctrl+c。知道为什么会这样吗?
Docker 镜像是在某个时间点构建的,然后它们由这些镜像的用户获取,并基于它们创建容器。查看 Linux 发行版(如 Ubuntu)上出现更新的频率,这是否意味着图像在发布到图像存储库后的第二天就已经过时了?
假设有人为他们的应用创建了一张图片:
FROM ubuntu
RUN apt update -y # or whatever the command to update on Ubuntu is
WORKDIR /myapp
COPY ./* ./
# and some other stuff
应用程序在某一天构建(使用ubuntu:latest
从那天开始),所有最新的补丁都通过 应用RUN apt update -y
,并且图像被推送到 Docker 存储库。现在,如果第二天在 Ubuntu 的 apt repo 上发布了一些重要的更新(比如一些 openssl 补丁)。我的应用程序呢?在我手动决定重建映像并再次推送之前,现在是否不安全?也许我们实际上不应该关心图像/容器是否过时而只担心运行容器的主机是否是最新的?如果是这样,为什么?