build with private repos
siegesmund opened this issue · 1 comments
siegesmund commented
I'm having trouble getting this package to work with private repositories. My function imports a package that exists on my local machine. However, dep tries to import it from its' private GitHub repo from within the docker container, causing the build to fail.
This seems like a pretty common use case, so is there a pattern to handle this?
mrserverless commented
For private repos you can mount your ssh keys into the container by adding:
~/.ssh:/root/.ssh
to you docker-compose.yml volume section. I.e. here https://github.com/yunspace/serverless-golang/blob/master/examples/aws-golang-event/docker-compose.yml#L8
For pulling packages from your local machine you can mount your GOPATH into the container:
/your-go-path:/go
Hope this helps!