All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Quentin Schulz" <quentin.schulz@cherry.de>,
	<docs@lists.yoctoproject.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [docs] [yocto-docs PATCH] Add scripts to build the docs in containers
Date: Tue, 03 Dec 2024 13:24:18 +0100	[thread overview]
Message-ID: <D622A5PA7U5V.1PIP950OVIFYC@bootlin.com> (raw)
In-Reply-To: <43178380-7636-4d2e-b964-a77a3759eae4@cherry.de>

Hi Quentin,

On Tue Dec 3, 2024 at 12:37 PM CET, Quentin Schulz wrote:
> Hi Antonin,
>
> On 12/3/24 11:48 AM, Antonin Godard wrote:
>> Hi Quentin,
>> 
>> On Fri Nov 29, 2024 at 4:01 PM CET, Antonin Godard wrote:
>> [...]
>>>>> +  fi
>>>>> +
>>>>> +  $CONTAINERCMD run \
>>>>> +    --rm --interactive --tty \
>>>>> +    --volume "$DOCS_DIR:/docs:rw" \
>>>>> +    --workdir "/docs" \
>>>>> +    $EXTRA_ARGS_RUN \
>>>>> +    "yocto-docs-$image" \
>>>>
>>>> please prepend the image name with localhost/ to be sure we don't end up
>>>> downloading some yocto-docs-ubuntu from docker.io for example :)
>>>
>>> Nice tip, didn't know about that one, thanks :)
>> 
>> Hm, this doesn't seem to work for me, and I couldn't find anything on the net
>> that shows this. Is there something I'm missing?
>> 
>>    Unable to find image 'localhost/yocto-docs-ubuntu-24-04:latest' locally
>>    docker: Error response from daemon: Get "http://localhost/v2/": dial tcp [::1]:80: connect: connection refused.
>> 
>> 
>> Building an image named "localhost/..." will work, but I think it's just
>> building an image with the name "localhost/...". Not really building something
>> local.
>> 
>
> $ cat Containerfile
> FROM debian:bookworm-slim
> $ podman build -f Containerfile -t test-image:latest
> [...]
> $ podman image ls | grep test-image:latest
> localhost/test-image 
> latest                b2ac1dc43440  14 months ago  156 MB
> $ podman run -it --userns=keep-id localhost/test-image
> qschulz@e706c5542422:/$
> $ cat Containerfile.from
> FROM localhost/test-image
> $ podman build -f Containerfile.from -t another-image:latest
> [...]
> $ podman run -it --userns=keep-id localhost/another-image
> qschulz@4e1f3229a196:/$
>
> On Fedora 41.
>
> Could possibly be yet another difference with Docker?

I think that's it. Supported by podman but not docker, as I had no issue doing
this with podman in the end.

> I couldn't find a way to force fully qualified names from the CLI (one 
> can do that with podman on fedora by removing 
> unqualified-search-registries in /etc/containers/registries.conf I 
> believe). I guess maybe --block-registry '*' would work, but still not 
> sure this is something supported by Docker either, /me shrugs.

For simplicity and compatibility, I guess we can leave it as that (no
localhost/). In the second iteration of my patch I will merge the two scripts
into one (also for simplicity), so there should be no way to reach the run
command without actually building the container prior.

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2024-12-03 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 13:22 [yocto-docs PATCH] Add scripts to build the docs in containers Antonin Godard
2024-11-25 18:26 ` [docs] " Quentin Schulz
2024-11-29 15:01   ` Antonin Godard
2024-12-03 10:48     ` Antonin Godard
2024-12-03 11:37       ` Quentin Schulz
2024-12-03 12:24         ` Antonin Godard [this message]
2024-12-03 12:32           ` Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D622A5PA7U5V.1PIP950OVIFYC@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=quentin.schulz@cherry.de \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.