title: RHEL 8 Container MSSQL ODBC Driver e2fsprogs
body: <p>I'm trying to build a custom docker container using the RHEL 8 UBI. As part of this I want to install the MSSQL 17 ODBC driver.
  I've followed the steps outlined in Microsofts Documentation here:
  <a href="https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#redhat17" rel="noreferrer">https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#redhat17</a></p>
  <p>And added the Microsoft repo to my <code>yum.repos.d</code> directory however when I try to build the container I get the following error: <code>nothing provides e2fsprogs needed by msodbcsql17-17.6.1.1-1.x86_64</code></p>
  <p>When I dug a bit further into this it looks as though it looks as though for RHEL-7 Microsoft suggest installing e2fsprogs manually you can see that here: <a href="https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#offline-installation" rel="noreferrer">https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#offline-installation</a></p>
  <p>This unfortunately isn't possible in RHEL-8 as e2fsprogs-static has been removed: <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages" rel="noreferrer">https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#removed-packages_changes-to-packages</a></p>
  <p>The full output from the build is:</p>
  <pre><code>$  docker build -f ./test.dockerfile -t daark:1 .
  Sending build context to Docker daemon  25.77MB
  Step 1/7 : FROM registry.redhat.io/ubi8/ubi
   ---&gt; a1f8c9699786
  Step 2/7 : RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo &gt; /etc/yum.repos.d/mssql-release.repo
   ---&gt; Using cache
   ---&gt; 90b3e1514239
  Step 3/7 : RUN yum search odbc
   ---&gt; Using cache
   ---&gt; b26f78d0da28
  Step 4/7 : RUN yum search msodbcsql17
   ---&gt; Using cache
   ---&gt; c6f7751b97dc
  Step 5/7 : ENV ACCEPT_EULA=Y
   ---&gt; Using cache
   ---&gt; 2b0003944673
  Step 6/7 : RUN yum install -y unixODBC unixODBC-devel
   ---&gt; Using cache
   ---&gt; 1d0b8c594905
  Step 7/7 : RUN yum install -y msodbcsql17
   ---&gt; Running in 67c30e75fb42
  Updating Subscription Management repositories.
  Unable to read consumer identity
  This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  Last metadata expiration check: 0:08:11 ago on Wed Aug  5 09:36:32 2020.
  Error:
   Problem: cannot install the best candidate for the job
    - nothing provides e2fsprogs needed by msodbcsql17-17.6.1.1-1.x86_64
  (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
  The command '/bin/sh -c yum install -y msodbcsql17' returned a non-zero code: 1
  </code></pre>
  <p>This error is pretty reproducible here is the test dockerfile i'm using to debug</p>
  <pre><code>
  FROM registry.redhat.io/ubi8/ubi
  RUN curl https://packages.microsoft.com/config/rhel/8/prod.repo &gt; /etc/yum.repos.d/mssql-release.repo
  RUN yum search odbc
  RUN yum search msodbcsql17
  ENV ACCEPT_EULA=Y
  RUN yum install -y unixODBC unixODBC-devel 
  RUN yum install -y msodbcsql17
  </code></pre>
  <p>Has anyone managed to get this ODBC driver installed on an RHEL 8 UBI based container?</p>