-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dockertest.Resource.Exec fails with "Unrecognized input header: 100" #472
Comments
Never mind bothering with answering this bug issue and even fixing this obvious incompatibility with the Docker API's For those stumbling upon the same problem, I've fixed it. I've simply written my own replacment for this module (not a drop-in), using the official Docker Go client, designing a neat function option API that works so much better than anticipated, and large test coverage on top, so I'm now replacing dockertest in company projects as well as my own. Now I have proper diagnosis ouput from builds, container runs, and command execs inside containers whenever a unit test fails. FYI, https://github.com/thediveo/morbyd The above unit test excerpt now becomes as follows, properly streaming build and container output, without even needing to use a pseudo TTY: By("spinning up a Docker container with stand-alone containerd, courtesy of the KinD k8s sig")
Expect(sess.BuildImage(ctx, "./_test/kindisch",
build.WithTag(img.Name),
build.WithBuildArg("KINDEST_BASE_TAG="+test.KindestBaseImageTag),
build.WithOutput(timestamper.New(GinkgoWriter)))).
Error().NotTo(HaveOccurred())
providerCntr = Successful(sess.Run(ctx, img.Name,
run.WithName(kindischName),
run.WithAutoRemove(),
run.WithPrivileged(),
run.WithSecurityOpt("label=disable"),
run.WithCgroupnsMode("private"),
run.WithVolume("/var"),
run.WithVolume("/dev/mapper:/dev/mapper"),
run.WithVolume("/lib/modules:/lib/modules:ro"),
run.WithTmpfs("/tmp"),
run.WithTmpfs("/run"),
run.WithDevice("/dev/fuse"),
run.WithCombinedOutput(timestamper.New(GinkgoWriter)))) Thank you for the fish. |
Preflight checklist
Ory Network Project
No response
Describe the bug
dockertest.Resource.Exec(..., dockertest.ExecOptions{StdOut: ..., StdErr: ..., TTY: true})
fails withStart exec failed: Unrecognized input header: 100
. This happens regardless of whether the corresponding container has been created with or withoutTty: true
.Reproducing the bug
Relevant log output
No response
Relevant configuration
No response
Version
v3.10.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker
Additional Context
No response
The text was updated successfully, but these errors were encountered: