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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Is anyone else struggling with Docker buildx?

1 点作者 4oo4大约 2 年前
I just used docker&#x27;s buildx for the first time (after being forced to since it&#x27;s the default) and am already dreading being forced to use it because of the additional complexity and poor documentation.<p>So I had a really simple workflow of using intermediate containers to build something from source, then a prod container that pulls build artifacts from the build container.<p>Yesterday I tried building an image and saw that buildx was the preferred engine since the legacy build is now deprecated, so after reading the docs I got the impression that I could mostly use the same workflow as before. After a few tries of this the buildx plugin would not build anything since would not fully read my dockerfile, or it would not even start the build since it was trying to remove a zfs snapshot from my graph directory that didn&#x27;t actually exist.<p>Today I took another stab at it, and find that there&#x27;s a separate daemon called buildkitd that doesn&#x27;t seem to be available via the apt packages, so I grab the tarball from GitHub. Then I have to hunt in the repo to find systemd service files.<p>https:&#x2F;&#x2F;github.com&#x2F;moby&#x2F;buildkit<p>So I extract the tarball and then find that buildkitd won&#x27;t start because it seems to be hardcoded to look in &#x2F;usr&#x2F;local&#x2F;bin instead of PATH. I move them there, then my image will actually start building. The build stopped partway through because of an update to Maven, which is not a big deal, but then I find that I can&#x27;t step into an intermediate container to inspect a broken build, since this isn&#x27;t exposed anymore.<p>https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;70715535<p>I fix the build issue and the build finally succeeds, then I find that the image isn&#x27;t loaded into my docker daemon, so now I also have to figure that out.<p>It&#x27;s on me for not keeping up with the transition to buildx, but did anyone else go through this much pain? I&#x27;d like to think that there&#x27;s a path of least resistance or documentation I missed somewhere, but I&#x27;m surprised that attempting to do something this simple took this much effort, when the docs for buildx make it seem like it&#x27;s a drop in replacement. Had I not just invested time in locking down my docker containers with privileges and userns I probably would be looking at using podman instead.

暂无评论

暂无评论