TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Copy Container Filesystems Easily With dcp

6 pointsby 1-KB-OKover 2 years ago

1 comment

1-KB-OKover 2 years ago
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 未加载