qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of 'apt' in scripting in our dockerfiles provokes warnings


From: Philippe Mathieu-Daudé
Subject: Re: use of 'apt' in scripting in our dockerfiles provokes warnings
Date: Wed, 30 Sep 2020 12:43:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/30/20 12:33 PM, Peter Maydell wrote:
> While processing a recent pullreq which updated the dockerfile
> dependencies and thus provoked a rebuild, I noticed that we
> use the 'apt' command in ways that provoke a warning:
> 
> #7 0.789 WARNING: apt does not have a stable CLI interface. Use with
> caution in scripts.
> 
> The apt(8) manpage says:
> 
> SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
>        The apt(8) commandline is designed as an end-user tool and it may
>        change behavior between versions. While it tries not to break backward
>        compatibility this is not guaranteed either if a change seems
>        beneficial for interactive use.
> 
>        All features of apt(8) are available in dedicated APT tools like apt-
>        get(8) and apt-cache(8) as well.  apt(8) just changes the default value
>        of some options (see apt.conf(5) and specifically the Binary scope). So
>        you should prefer using these commands (potentially with some
>        additional options enabled) in your scripts as they keep backward
>        compatibility as much as possible.
> 
> That suggests that we should probably be using apt-get instead
> of apt in our dockerfiles...

I concur.

> 
> Also, any idea what this error is about?
> 
> #4 importing cache manifest from registry.gitlab.com/qemu-project/qemu/qemu...
> #4       digest:
> sha256:815fb44b573ac7520d148d9b2510c00f31846ca6fa55127d322bc8db3c5d0ec0
> #4         name: "importing cache manifest from
> registry.gitlab.com/qemu-project/qemu/qemu/debian-alpha-cross:latest"
> #4      started: 2020-09-29 22:57:54.371490684 +0000 UTC
> #4    completed: 2020-09-29 22:57:55.064468936 +0000 UTC
> #4     duration: 692.978252ms
> #4        error: "invalid build cache from
> {MediaType:application/vnd.docker.distribution.manifest.v2+json
> Digest:sha256:a1e8a5830bb19b7cddda64872c5d71a0337d4b98bed30fd7684d20467adcd289
> Size:1161 URLs:[] Annotations:map[] Platform:<nil>}"
> 
> It didn't seemt to have an adverse effect...

It seems to come from '--cache-from' from commit e6f1306b10,
there is some DOCKER_BUILDKIT black magic involved.

What is your 'docker version' output please?

> 
> thanks
> -- PMM
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]