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
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.
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
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