fix: use moby/term rather than our own term package#227
Conversation
|
So originally I added docker as a direct dependency because there was no other way of consuming the Docker API without writing a lot of curl myself. The problem was however, that Docker pulled quite a lot of code that wasn't actually used. I could not find a way (at the time) to prevent those unused modules from being pulled. I still think it's not possible. However, maybe today there is a much better option to talk to Docker's API? In which case we would probably also circumvent all the build issues and stuff! Maybe you know this? |
|
@aeneasr I haven't looked at the full dockerclient in a while. I was mostly interested in fixing the issue with having to pin I don't mind looking into docker client, but I just wanted to offer up a PR to fix the current pressing issue quickly :) This PR only pulls in moby/term, which does not pull in any additional dependencies beyond what dockertest already depends on: https://github.com/ory/dockertest/pull/227/files#diff-37aff102a57d3d7b797f152915a6dc16 |
|
It seems the "official" dockerclient still pulls in a large number of dependencies. The moby/term package in this PR does not pull in any additional dependencies. I'd like to not have to pin github.com/x/sys/ to a specific version anymore. If the approach in this PR is not acceptable, what alternative would be? I'm happy to do a PR. Thanks! |
|
Ok, sounds good and sorry for the late review, it was a busy week :) |
Related issue
#212
#208
Proposed changes
Use https://github.com/moby/term rather than the term package introduced in #122
There is only a single call to term in the code base at
dockertest/docker/pkg/jsonmessage/jsonmessage.go
Line 129 in 5c87315
Checklist
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
Further comments
I considered editing docker/pkg/term to include the fixes from moby/term#16 but dockertest only has a single call to the term package.