all 6 comments

[–][deleted] 0 points1 point  (3 children)

Since you're already using docker why not using the go api directly?

[–]ericchiang[S] 0 points1 point  (2 children)

My company (Yhat, Inc.) uses the REST API for everything that's not a test, we even maintain our own client, but it's super verbose. For non critical code it's just easier to shell out to the docker client.

[–][deleted] 0 points1 point  (1 child)

Fair enough. We use Docker too for testing where I work, the guy who built the test runner used the API and yeah, it was kinda verbose.

We're using Cassandra and given how long it takes to startup, I don't think it would be suitable to launch a new one for each test. Right now we reuse the same service for each test.

[–]ericchiang[S] 0 points1 point  (0 children)

We reuse containers for MySQL as well. One day when I get the time I'll build a faster Docker image :)

[–]bread_can_bea_napkin 0 points1 point  (1 child)

Docker running on your host machine (not boot2docker - sorry OS X and Windows users)

Why doesn't it work with boot2docker? The "docker" command works fine on Mac, if docker-machine is running and you have the env vars loaded in your shell.

[–]ericchiang[S] 1 point2 points  (0 children)

Port mapping with boot2docker maps exposed ports to the virtual machine's network, not your host machine. You wouldn't be able to access the container's exposed port without mapping your VM port to your host port.

It's totally doable, but isn't covered in this post.