couchbaselabs / sdk-doctor

Application-server-side cluster connection diagnostics.
https://couchbase.com/
Apache License 2.0
18 stars 12 forks source link

Add Dockerfile to build a Docker image for SDK Doctor #15

Closed brantburnett closed 6 years ago

brantburnett commented 6 years ago

Motivation

Easily run SDK Doctor on any system with Docker installed, without downloading/installing binaries. Also, easily run SDK Doctor on a Kubernetes cluster to test connectivity in situ.

Modifications

Added a Dockerfile to perform build.

Results

Running docker build -t tagname . will build a slim Docker image using a multi-stage build.

An example build is currently available on Docker Hub at btburnett3/sdk-doctor.

Usage:

docker run --rm btburnett3/sdk-doctor diagnose couchbase://node/bucket

Kubernetes usage:

kubectl run sdktest --rm -i --image btburnett3/sdk-doctor -- diagnose couchbase://node/bucket

It would be desirable to include this build process in .travis.yml and publish the image to couchbase/sdk-doctor, but I lack the credentials so did not include it at this time.

brett19 commented 6 years ago

Hey @brantburnett, Any chance you could contribute an example of the expansion of our travis configuration to build the docker image? Cheers, Brett

brantburnett commented 6 years ago

@brett19 sure thing, not too hard.