GST_PLUGIN_SCANNER Error

I am building GStreamer 1.24 from source in Docker. Things run properly, however, I do get this GST_PLUGIN_LOADING and GST_PLUGIN_SCANNER error/warning:

gst-inspect-1.0 srtpdec
0:00:00.001521412    13 0x5561504ec4a0 ERROR     GST_PLUGIN_LOADING gstpluginloader.c:432:gst_plugin_loader_try_helper: Spawning gst-plugin-scanner helper failed: Failed to close file descriptor for child process (Operation not permitted)

(gst-inspect-1.0:13): GStreamer-WARNING **: 18:54:04.789: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.

*...From here the SRTPDEC is inspected properly...*

Here is my GStreamer build process in Docker, I’m guessing I am not setting some environment variable(s) correctly after the installation as I am using a custom prefix.
The Dockerfile is using Ubuntu 22.04.

# =========== BUILD BASE GST ============ #
# NOTE: Base Gst that comes with the image is /usr/lib/x86.../gstreamer-1.0
RUN mkdir /opt/gst-$GST_VERSION
WORKDIR /opt/gst-$GST_VERSION

# Clone the main repository
RUN git clone https://gitlab.freedesktop.org/gstreamer/gstreamer

# Select the gstreamer version to checkout
RUN cd gstreamer && git checkout $GST_VERSION
WORKDIR /opt/gst-$GST_VERSION/gstreamer

# build with meson
#RUN meson --prefix=/opt/gst-$GST_VERSION/gstreamer -Dgpl=enabled build
RUN meson setup --prefix=/opt/gst-$GST_VERSION/gstreamer -Dgpl=enabled -Drtsp_server=enabled -Dpython=enabled builddir
RUN meson compile -C builddir
RUN meson install -C builddir
##RUN meson subprojects update
#WORKDIR /opt/gst-$GST_VERSION/gstreamer/builddir/
#RUN ninja install


# ============== BUILD GST PLUGINS ============== #
RUN mkdir /opt/gst-$GST_VERSION/rs
WORKDIR /opt/gst-$GST_VERSION/rs
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
RUN git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
RUN cargo install cargo-c
WORKDIR /opt/gst-$GST_VERSION/rs/gst-plugins-rs
ENV PKG_CONFIG_PATH="/opt/gst-$GST_VERSION/gstreamer/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"
#gst-plugins-rs/utils/fallbackswitch
RUN cargo cbuild -p gst-plugin-fallbackswitch --libdir=/opt/gst-$GST_VERSION/gstreamer/lib/x86_64-linux-gnu
RUN cargo cinstall -p gst-plugin-fallbackswitch --libdir=/opt/gst-$GST_VERSION/gstreamer/lib/x86_64-linux-gnu
ENV LD_LIBRARY_PATH="/opt/gst-$GST_VERSION/gstreamer:/opt/gst-$GST_VERSION/gstreamer/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
ENV PATH="/opt/gst-1.24/gstreamer/bin:/opt/gst-$GST_VERSION/gstreamer:$PATH"
ENV GST_PLUGIN_SCANNER="/opt/gst-1.24/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner:$GST_PLUGIN_SCANNER"

As you can see I tried editing the GST_PLUGIN_SCANNER environment variable but that didn’t seem to help. Can anyone let me know how to fix this?