How to build docker image from github repository

后端 未结 3 1397
囚心锁ツ
囚心锁ツ 2021-01-31 08:24

In official docs we can see:

# docker build github.com/creack/docker-firefox

It just works fine to me. docker-firefox is a reposit

3条回答
  •  情书的邮戳
    2021-01-31 09:22

    The thing you specified as repo URL is not a valid git repository. You will get error when you will try

    git clone github.com/docker-library/redis/tree/99c172e82ed81af441e13dd48dda2729e19493bc/2.8.10

    Valid URL for this repo is github.com/docker-library/redis. So you may want to try following:

    docker build github.com/docker-library/redis

    But this will not work too. To build from github, docker requires Dockerfile in repository root, howerer, this repo doesn't provide this one. So, I suggest, you only have to clone this repo and build image using local Dockerfile.

提交回复
热议问题