~sircmpwn/sr.ht-discuss

3 3

build docker image directly from sr.ht

Details
Message ID
<20201112214423.GB26072@gmail.com>
DKIM signature
pass
Download raw message
Hello,

I do have a beginner question. Is it possible to build a docker image directly
from the sr.ht? If so, how?

I do:

    $ docker build -t www https://git.sr.ht/~qeef/damn-www

That returns the error:

    Sending build context to Docker daemon  17.41kBs://git.sr.ht/~qeef/damn-www 15.59kB
    Error response from daemon: Dockerfile parse error line 1: unknown instruction: <!DOCTYPE

For completeness:

    $ docker --version
    Docker version 19.03.12, build 48a66213fe

I tried to debug a little but I don't know much where to look.

Thanks!
jiri
Details
Message ID
<a8a7ff6d-7157-91f7-c8e4-a3cfb7d967ac@gmail.com>
In-Reply-To
<20201112214423.GB26072@gmail.com> (view parent)
DKIM signature
pass
Download raw message
On 2020-11-12 2:44 PM, Jiri Vlasak wrote:
>      $ docker build -t www https://git.sr.ht/~qeef/damn-www

Unfortunately, Docker assumes every HTTPS git URL ends with ".git", 
which Sourcehut does not support. You can use the SSH clone URL, but 
(unless this has changed recently) you'll need to be using a key that's 
authorized on your account or Sourcehut will reject the SSH clone entirely.
Details
Message ID
<20201113093517.lalib4begmitxanq@morc.localdomain>
In-Reply-To
<20201112214423.GB26072@gmail.com> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
On 20-11-12 22:44:23, Jiri Vlasak wrote:
> Hello,
> 
> I do have a beginner question. Is it possible to build a docker image directly
> from the sr.ht? If so, how?

Hi Jiri,

I think the way to do this is to build the docker image in the repo
where the Dockerfile actually is. Then you push the image to a docker
repository that you can then pull where you need it to.

Cheers,
/Marius
Details
Message ID
<20201113143241.GA9633@gmail.com>
In-Reply-To
<20201113093517.lalib4begmitxanq@morc.localdomain> (view parent)
DKIM signature
pass
Download raw message
Thanks guys.

> Unfortunately, Docker assumes every HTTPS git URL ends with ".git", 

Thanks for pointing me out! I found the issue where it's discussed [1].

> which Sourcehut does not support.

I just renamed `my-repository` to `my-repository.git`. Ugly hack from [1] but
it works.

> You can use the SSH clone URL, but (unless this has changed recently)

It didn't changed and I don't want to use that. (It works for me locally but
it's not enough.)

> I think the way to do this is to build the docker image in the repo

Thanks for suggestion but it's not good enough for the intended use-case.

Thanks again!
jiri

[1]: https://github.com/docker/cli/issues/1738
Reply to thread Export thread (mbox)