How to install a local rpm file when building docker instance?

后端 未结 4 1785
孤独总比滥情好
孤独总比滥情好 2021-02-02 13:56

I have following docker file, I want to specifically install a rpm file that is available on my disk as I am building docker instance. My invocation of rpm install looks like th

4条回答
  •  后悔当初
    2021-02-02 14:31

    As and addendum to what others have written here, rather than using:

    RUN rpm -i xyz.rpm
    

    You might be better off doing this:

    RUN yum install -y xyz.rpm
    

    The latter has the advantages that (a) it checks the signature, (b) downloads any dependencies, and (c) makes sure YUM knows about the package. This last bit is less important than the other two, but it's still worthwhile.

提交回复
热议问题