I'm using docker containers for some of my golang web service projects and part of the development workflow is using goconvey for some fast tdd feedback. I'd like to spin this up within a docker container and expose the port to the host machine so I can point my web browser to it and get coding.
We have compiled the goconvey binary and have popped it in /usr/local/bin The problem is that whenever I connect to the port exposed form the docker container I only get "404 Page not found" errors.
There are a few tweaks we have with out GOPATH specifically I'm vendoring my libs eg GOPATH=/proj-dir/vendor and code dev is happening in /src
I can get goconvey working nicely on my host but in the docker i'm stumped. The 404 suggest that I'm hitting the goconvey server but it does not serve up anything?
Any assistance appreciated.
The goconvey server returns 404 when it cannot find the directory that contains the static resources.
The location of this directory depends on where go get stored the goconvey files, usually in
$GOPATH/src/github.com/smartystreets/goconvey
So in your docker container, ensure that goconvey is installed using the current $GOPATH
value, and also verify that the /goconvey
dir contains /web/client/...
subdirectories, which is where the html, css, and js files for the Web UI reside.
(To test this, I renamed the client dir, which caused goconvey to return a plain 404 message.)