在官方文档中我们可以看到:
# docker build github.com/creack/docker-firefox
对我来说一切都运行正常。docker-firefox
是一个存储库,并在根目录中有一个Dockerfile
。
然后我想构建Redis镜像,确切地说是版本2.8.10:
# docker build github.com/docker-library/redis/tree/99c172e82ed81af441e13dd48dda2729e19493bc/2.8.10
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 https://github.com/docker-library/redis/tree/99c172e82ed81af441e13dd48dda2729e19493bc/2.8.10/info/refs
fatal: HTTP request failed
)
我遇到了上述错误。从 Github 存储库构建 Docker 镜像的正确格式是什么?