Docker behaviour different on command line versus interactive prompt

I have a Docker image that fails to find Perl dependencies when run from the command line, but runs fine if I execute the same command from an interactive prompt in the Docker image.

I am running this image as follows from the command line:

docker run –rm -v /srv/data:/srv/data wgs_binning -i
/srv/data/contigs.fna.gz -c /srv/data/coverage.tsv -o
/srv/data/test_binning

This results in the following issue related to Perl dependencies:

Can’t locate LWP/Simple.pm in @INC (you may need to install the
LWP::Simple module) (@INC contains: /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.36.0
/usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base
/usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36
/usr/local/lib/site_perl) at /opt/conda/bin/run_MaxBin.pl line 4.
BEGIN failed–compilation aborted at /opt/conda/bin/run_MaxBin.pl line
4.

I am accessing an interactive prompt of the Docker image with:

docker run –rm -it -v /srv/data:/srv/data –entrypoint bash
wgs_binning

If I run the following in the interactive prompt, it runs without issue:

python3 binning -i /srv/data/contigs.fna.gz -c /srv/data/coverage.tsv
-o /srv/data/test_binning

The entry point of my Dockerfile is ENTRYPOINT ["python3", "binning"] so I would have expected the behaviour in these two situations to be identical.

Is there some sort of pathing or permission difference between running a command on the command line versus on an interactive prompt?

The offending program here is called MaxBin and this is install in the Dockerfile via mamba. Not sure this should matter, but perhaps there is an interaction between the conda/mamba environment that differs under the two scenarios I outlined?

Thanks,
Donovan

Full Dockerfile as as follows:

FROM python:3.12.4-slim-bookworm

LABEL description="Recover MAGs from assembled contigs using UniteM."
LABEL maintainer="Donovan Parks <[email protected]>"
LABEL version="0.1.0"

# install additional Linux dependencies
RUN apt-get update -y -m && 
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y 
    wget && 
    apt-get clean && 
    rm -rf /var/lib/apt/lists/*

# install Mambaforge
RUN wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O ~/mambaforge.sh && 
    /bin/bash ~/mambaforge.sh -b -p /opt/conda && 
    rm ~/mambaforge.sh

# Put mamba in path so we can use mamba commands
ENV PATH="${PATH}:/opt/conda/bin"

# initialize shell with conda
RUN /opt/conda/bin/conda init bash

# install bioinformatics tools with mamba where available
RUN mamba install -c bioconda 
    metabat2=2.15 
    maxbin2=2.2.7 
    && mamba clean --all

# activate the virtual environment and install dependencies
WORKDIR /wgs_pipeline/dependencies
RUN /opt/conda/bin/pip install --upgrade pip
COPY KBL/requirements.txt requirements.txt
RUN /opt/conda/bin/pip install -r requirements.txt unitem==1.2.6 checkm-genome==1.2.3

# install KBL and WPL libraries
WORKDIR /wgs_pipeline/libraries
COPY wgs_pipeline/wgs_pipeline/wpl/*.py ./wpl/
COPY KBL/kbl/*.py ./kbl/
COPY KBL/kbl/external/*.py ./kbl/external/

# add KBL and WPL libraries to Python path
ENV PYTHONPATH="/wgs_pipeline"
ENV PYTHONPATH="/wgs_pipeline/libraries:${PYTHONPATH}"

# copy WGS application script(s)
WORKDIR /wgs_pipeline/apps
COPY wgs_pipeline/wgs_pipeline/apps/binning/*.py ./binning/
ENTRYPOINT ["python3", "binning"]

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật