How does docker build Images from github

  docker, question

There is an example in the official documents:

docker build

You can see the abovedocker-firefoxIs a repository and has oneDockerfileDocuments. Now I want to build a redis from github to the local image (and only need the version 2.8.10)
Then why can’t I do this:

# docker build
 2014/11/05 16:20:32 Error trying to use git: exit status 128 (Initialized empty Git repository in /tmp/docker-build-git067001920/.git/
 error: The requested URL returned error: 403 while accessing
 fatal: HTTP request failed
 This is no good either.
 # docker build
 2014/11/05 16:22:43 Invalid Dockerfile format

How do you write build?

The problem is that you did not correctly access the Dockerfile so that your host can normally access github first.