samalba / dockerclient

Docker client library in Go
http://www.docker.com/
Apache License 2.0
320 stars 140 forks source link

#202 breaks non-cgo build #214

Open rubenv opened 8 years ago

rubenv commented 8 years ago

202 causes a forced dependency on cgo.

Can this be avoided?

rubenv commented 8 years ago

Ping @dongluochen

dongluochen commented 8 years ago

@rubenv A little background here. Users reported this connection hang problem to us. It takes ~15 minutes in Linux to break such connections. I do not find alternative way to implement send timeout without cgo as Go doesn't support this setting.

I see your question on #213. Looking into it.

rubenv commented 8 years ago

We compile our Docker images with Alpine as a base image. This doesn't run on musl, so a non-cgo build is needed. This is for a tiny service and I don't want to switch to a huge glibc-backed base image just for one call to Docker.

If there's a way to make this work with cgo on Alpine: that'd be good too. As it stands now: we need to enable cgo to build this. Once we do it no longer runs.

dongluochen commented 8 years ago

The change is reverted by #216. We will explore options for this bug.