Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • How to install optional packages in Dockerfile?

    Posted on

    I'm porting a Dockerfile from using centos7 to the rhel7 image. The docker image needs Xvfb (needed by Java for generating images on the server side) so I need to install xorg-x11-server-Xvfb and associated dependencies. On centos7 this is easy but on rhel 7 I need to use the optional packages. Unfortunately when I run "yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional" on a generic RHEL 7 image I get the correct subscriptions setup and can install the correct rpms but when I run docker I'm not able to install the package.

    What am I missing?

    Thanks
    Marc

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat