TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Copy Container Filesystems Easily With dcp

6 点作者 1-KB-OK超过 2 年前

1 comment

1-KB-OK超过 2 年前
Containers are great tools that can encapsulate an application and its dependencies, allowing apps to run anywhere in a streamlined way. Some container images contain commands to start a long-lived binary, whereas others may simply contain data that needs to be available in the environment (for example, a Kubernetes cluster). For example, operator-framework bundles and crossplane packages both use container images to store Kubernetes manifests. These manifests are unpacked on-cluster and made available to end users.<p>One of the downsides of using container images to store data is that they are necessarily opaque. There&#x27;s no way to quickly tell what&#x27;s inside the image, although the hash digest is useful in seeing whether the image has changed from a previous version. The options are to use docker cp or something similar using podman or containerd.<p>Using docker cp by itself can be cumbersome. Say you have a remote image somewhere in a registry. You have to pull the image, create a container from that image, and only then run docker cp &lt;container-id&gt; using an unintuitive syntax for selecting what should be copied to the local filesystem.<p>dcp is a simple binary that attempts to simplify this workflow. A user can simply say dcp &lt;image-name&gt; and it can extract the contents of that image onto the local filesystem. It can also just print the contents of the image to stdout, and not create any local files.
评论 #32629599 未加载