I'm failing to build a docker image from a private bitbucket repository. My bitbucket repo has a "Dockerfile" on its root as described in the docker documentation.
docker --version
Docker version 1.3.1, build 4e9bbfa
I have tried...
docker build --rm=true --tag="myorg/myimagename" git://bitbucket.org:myacct/myrepo.git
error: fatal: unable to connect to bitbucket.org: bitbucket.org: Servname not supported for ai_socktype
docker build --rm=true --tag="myorg/myimagename" git://git@bitbucket.org:myacct/myrepo.git
error: fatal: unable to connect to bitbucket.org: bitbucket.org: Servname not supported for ai_socktype
Docs I'm following...
- I am assuming my host machine's keys will be used.
When a Git repository is set as URL, then the repository is used as the context. The Git repository is cloned with its submodules (git clone -recursive). A fresh git clone occurs in a temporary directory on your local host, and then this is sent to the Docker daemon as the context. This way, your local user credentials and VPN's etc can be used to access private repositories.
- I am also assuming docker will pickup the Dockerfile & context from the repository.
This will clone the GitHub repository and use the cloned repository as context. The Dockerfile at the root of the repository is used as Dockerfile. Note that you can specify an arbitrary Git repository by using the git:// schema.
https://docs.docker.com/reference/commandline/cli/#examples_1
I have already...
- Setup my ssh keys correctly between bitbucket and my host machine
- Successfully cloned the private bitbucket repo via ssh on the host machine