Flimzy kindly pointed me to another answer (which I would never have found without knowledgeable assistance). Since I think the build process is non-trivial, especially for non-Gophers such as myself, I will post the new
# Docker image for the Mongo Stitch command FROM golang:alpine # Do a system update RUN apk update RUN apk add git curl # Declare base dir WORKDIR /root/src RUN git clone https://github.com/10gen/stitch-cli.git WORKDIR /root/src/stitch-cli # Remove the old dependencies RUN rm -rf vendor # Fetch the dependencies RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh RUN GOPATH=$GOPATH:/root dep ensure # Now it should build RUN GOPATH=$GOPATH:/root go build CMD ["/bin/sh"]
The fetching of the dependencies results in this error:
Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml: ✗ github.com/10gen/escaper ✗ github.com/dgrijalva/jwt-go ✗ github.com/ogier/pflag ✗ gopkg.in/mgo.v2 However, these projects are not direct dependencies of the current project: they are not imported in any .go files, nor are they in the 'required' list in Gopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so these rules will have no effect. Either import/require packages from these projects so that they become direct dependencies, or convert each [[constraint]] to an [[override]] to enforce rules on these projects, if they happen to be transitive dependencies.
However, it still seems to compile. My worry is that I have had to do far more steps than are in the documentation, which leads me to think that I have made this more complicated than it needs to be.
I have made my Docker repo permanently available here.