diff mbox series

[5/7] dockerfiles: enable Centos 8 PowerTools

Message ID 20201014135416.1290679-6-pbonzini@redhat.com
State New
Headers show
Series build: replace ninjatool with ninja | expand

Commit Message

Paolo Bonzini Oct. 14, 2020, 1:54 p.m. UTC
ninja is included in the CentOS PowerTools repository.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/docker/dockerfiles/centos8.docker | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniel P. Berrangé Oct. 14, 2020, 4:33 p.m. UTC | #1
On Wed, Oct 14, 2020 at 09:54:14AM -0400, Paolo Bonzini wrote:
> ninja is included in the CentOS PowerTools repository.

> 

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

> ---

>  tests/docker/dockerfiles/centos8.docker | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker

> index 0fc2697491..e31d366fc1 100644

> --- a/tests/docker/dockerfiles/centos8.docker

> +++ b/tests/docker/dockerfiles/centos8.docker

> @@ -1,6 +1,9 @@

>  FROM centos:8.1.1911

>  

> +RUN dnf -y install dnf-plugins-core

> +RUN dnf config-manager --set-enabled PowerTools

>  RUN dnf -y update


This results in multiple image layers which is undesirable. Instead do

 RUN dnf -y install dnf-plugins-core && \
     dnf config-manager --set-enabled PowerTools && \
     dnf -y update


> +

>  ENV PACKAGES \

>      SDL-devel \

>      bzip2 \


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 :|
Cleber Rosa Oct. 14, 2020, 8:49 p.m. UTC | #2
On Wed, Oct 14, 2020 at 09:54:14AM -0400, Paolo Bonzini wrote:
> ninja is included in the CentOS PowerTools repository.

> 

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

> ---

>  tests/docker/dockerfiles/centos8.docker | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker

> index 0fc2697491..e31d366fc1 100644

> --- a/tests/docker/dockerfiles/centos8.docker

> +++ b/tests/docker/dockerfiles/centos8.docker

> @@ -1,6 +1,9 @@

>  FROM centos:8.1.1911

>  

> +RUN dnf -y install dnf-plugins-core

> +RUN dnf config-manager --set-enabled PowerTools


Since config-manager won't be used besides here, I think it's safe and
cheaper to simply do:

   RUN sed -i /etc/yum.repos.d/CentOS-PowerTools.repo -e 's/^enabled=0/enabled=1/'

It's also a single command, reducing the number of layers.

- Cleber.

>  RUN dnf -y update

> +

>  ENV PACKAGES \

>      SDL-devel \

>      bzip2 \

> -- 

> 2.26.2

> 

> 

>
Paolo Bonzini Oct. 15, 2020, 6:36 a.m. UTC | #3
On 14/10/20 22:49, Cleber Rosa wrote:
> On Wed, Oct 14, 2020 at 09:54:14AM -0400, Paolo Bonzini wrote:

>> ninja is included in the CentOS PowerTools repository.

>>

>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

>> ---

>>  tests/docker/dockerfiles/centos8.docker | 3 +++

>>  1 file changed, 3 insertions(+)

>>

>> diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker

>> index 0fc2697491..e31d366fc1 100644

>> --- a/tests/docker/dockerfiles/centos8.docker

>> +++ b/tests/docker/dockerfiles/centos8.docker

>> @@ -1,6 +1,9 @@

>>  FROM centos:8.1.1911

>>  

>> +RUN dnf -y install dnf-plugins-core

>> +RUN dnf config-manager --set-enabled PowerTools

> 

> Since config-manager won't be used besides here, I think it's safe and

> cheaper to simply do:

> 

>    RUN sed -i /etc/yum.repos.d/CentOS-PowerTools.repo -e 's/^enabled=0/enabled=1/'

> 

> It's also a single command, reducing the number of layers.


Yeah, I'm lazy. :)  I'll use Dan's suggestion.

Paolo
diff mbox series

Patch

diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 0fc2697491..e31d366fc1 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -1,6 +1,9 @@ 
 FROM centos:8.1.1911
 
+RUN dnf -y install dnf-plugins-core
+RUN dnf config-manager --set-enabled PowerTools
 RUN dnf -y update
+
 ENV PACKAGES \
     SDL-devel \
     bzip2 \