* use of 'apt' in scripting in our dockerfiles provokes warnings
@ 2020-09-30 10:33 Peter Maydell
2020-09-30 10:43 ` Philippe Mathieu-Daudé
2020-09-30 10:46 ` Daniel P. Berrangé
0 siblings, 2 replies; 4+ messages in thread
From: Peter Maydell @ 2020-09-30 10:33 UTC (permalink / raw)
To: QEMU Developers; +Cc: Fam Zheng, Philippe Mathieu-Daudé, Alex Bennée
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...
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...
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: use of 'apt' in scripting in our dockerfiles provokes warnings
2020-09-30 10:33 use of 'apt' in scripting in our dockerfiles provokes warnings Peter Maydell
@ 2020-09-30 10:43 ` Philippe Mathieu-Daudé
2020-09-30 12:58 ` Peter Maydell
2020-09-30 10:46 ` Daniel P. Berrangé
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-30 10:43 UTC (permalink / raw)
To: Peter Maydell, QEMU Developers; +Cc: Fam Zheng, Alex Bennée
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: use of 'apt' in scripting in our dockerfiles provokes warnings
2020-09-30 10:33 use of 'apt' in scripting in our dockerfiles provokes warnings Peter Maydell
2020-09-30 10:43 ` Philippe Mathieu-Daudé
@ 2020-09-30 10:46 ` Daniel P. Berrangé
1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2020-09-30 10:46 UTC (permalink / raw)
To: Peter Maydell
Cc: Fam Zheng, Alex Bennée, Philippe Mathieu-Daudé,
QEMU Developers
On Wed, Sep 30, 2020 at 11:33:21AM +0100, 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...
It appears that we already use apt-get in some of the dockerfiles.
Yay for consistency. Should be an easy switch to standardize on
apt-get though.
>
> 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...
I've not seen that before. I guess everything still works because cache
is optional.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: use of 'apt' in scripting in our dockerfiles provokes warnings
2020-09-30 10:43 ` Philippe Mathieu-Daudé
@ 2020-09-30 12:58 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-09-30 12:58 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Fam Zheng, Alex Bennée, QEMU Developers
On Wed, 30 Sep 2020 at 11:43, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 9/30/20 12:33 PM, Peter Maydell wrote:
> > 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?
e104462:bionic:qemu$ docker version
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:35:23 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:02:44 2019
OS/Arch: linux/amd64
Experimental: false
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-30 12:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-30 10:33 use of 'apt' in scripting in our dockerfiles provokes warnings Peter Maydell
2020-09-30 10:43 ` Philippe Mathieu-Daudé
2020-09-30 12:58 ` Peter Maydell
2020-09-30 10:46 ` Daniel P. Berrangé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).