You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is possible, feasible, or even out of scope, as my project does not strictly follow the sample hierarchy... But I'm trying to build docker images for a bunch of microservices. All of these microservices share a single authentication middleware function.
All of these services are stored in separate private repositories. When I try using golang-builder, I get 403s from the imported private repos for obvious reasons.
$ docker run --rm -v "$(pwd):/src" -v /var/run/docker.sock:/var/run/docker.sock centurylink/golang-builder
# cd .; git ls-remote https://bitbucket.org/xxx/auth
fatal: could not read Username for 'https://bitbucket.org': No such device or address
# cd .; hg identify https://bitbucket.org/xxx/auth
abort: HTTP Error 404: Not Found
package bitbucket.org/xxx/auth/middleware: https://api.bitbucket.org/1.0/repositories/xxx/auth: 403 FORBIDDEN
Is it possible to either;
a) use git/ssh credentials in build image
b) copy third-party imports from the $GOPATH/src directory at the same time as $(pwd), and use them in the build, then run a "go get" for any missing public imports.
I have found a workaround, by locally cross-compiling to linux, then running docker build myself, but this does have drawbacks... The person doing the build needs Go installed to compile stuff. Using golang-builder, anybody with Docker can run the build.
GOOS="linux" go build
docker build -t yyyservice
docker-compose up
The text was updated successfully, but these errors were encountered:
bbrks
changed the title
Unable to use packages with private repositories
Unable to use packages in private repositories
Dec 18, 2015
Not sure if this is possible, feasible, or even out of scope, as my project does not strictly follow the sample hierarchy... But I'm trying to build docker images for a bunch of microservices. All of these microservices share a single authentication middleware function.
All of these services are stored in separate private repositories. When I try using golang-builder, I get 403s from the imported private repos for obvious reasons.
Is it possible to either;$GOPATH/src directory at the same time as $ (pwd), and use them in the build, then run a "go get" for any missing public imports.
a) use git/ssh credentials in build image
b) copy third-party imports from the
I have found a workaround, by locally cross-compiling to linux, then running docker build myself, but this does have drawbacks... The person doing the build needs Go installed to compile stuff. Using golang-builder, anybody with Docker can run the build.
The text was updated successfully, but these errors were encountered: