Google COS beta-67及更高版本中docker build执行失败求助
Docker Build Fails with "Unexpected EOF" on COS beta-67/dev-68 (Works on stable-65)
This is a tricky compatibility quirk between Google Container-Optimized OS (COS) versions and Docker's build pipeline. From what you've shared, it’s not immediately clear if this is an intentional breaking change or a regression bug—let’s break down the details first:
Reproduction Steps & Exact Error
Your test setup (cleaned up for readability) looks like this:
Dockerfile:
FROM alpine:6.7
Build Command & Output:
$ docker build -t foo . Sending build context to Docker daemon 2.048 kB Error response from daemon: Error processing tar file(exit status 1): unexpected EOF
As you noted, this runs perfectly on COS stable-65 but throws the unexpected EOF error consistently on beta-67 and dev-68.
Next Steps to Diagnose & Address
- Check COS Release Docs: Look through the release notes for beta-67 and dev-68 to see if there were explicit changes to Docker/Moby versions or build context handling. Newer COS builds often update underlying runtime components, which can introduce breaking behavior.
- Simplify the Build Context: Even with a minimal setup, adding a
.dockerignorefile to exclude extraneous files (like.gitdirectories, logs, or temp assets) can rule out issues with tarball generation during context upload. - Test on a Fresh Instance: Spin up a clean beta-67/dev-68 instance and run the exact same build steps—this eliminates the chance of local filesystem corruption or leftover config causing the issue.
- Report to Google Cloud: If you can confirm this is consistent across clean environments, file a bug report via Google Cloud’s internal issue tracker. Include the exact COS versions,
docker --versionoutput, and full reproduction steps to help the team confirm if this is intentional design or a bug.
内容的提问来源于stack exchange,提问作者joe miller
相关产品推荐
相关产品推荐

