Docker installation testing fails because of missing dependency which was installed earlier

153 views Asked by At

I'm trying to create a deb of a python project for Ubuntu 18.04 via docker which passes installation testing.

My compile.dockerfile includes this:

RUN apt-get update && \
apt-get install --yes --no-install-recommends \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*

Later on installation testing fails, despite zlib1g-dev having been installed above, with this error:

   configure: error: zlib development files not found

    HTSlib uses compression routines from the zlib library <http://zlib.net>.
    Building HTSlib requires zlib development files to be installed on the build
    machine; you may need to ensure a package such as zlib1g-dev (on Debian or
    Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions or Cygwin)
    is installed.

Installation testing is done via:

docker run --rm ${INTERACTIVE_PARAMETERS} --hostname="dnae.com" \
--memory=8192m --cpus=${NUMBER_OF_PROCESSORS} \
--mount src=${SRC_DIR},target=${SRC_DIR_IN_DOCKER},type=bind,readonly \
--mount src=${INPUT_DIR},target=/media/input,type=bind,readonly \
${IMAGE_PREFIX}_installation_testing:${UBUNTU_VERSION} \
/bin/bash -c " \
sudo useradd --create-home --home-dir=/home/${USER_TO_USE_FOR_RUN} --shell /bin/bash --uid ${UID} ${USER_TO_USE_FOR_RUN} \
&& cd /home/${USER_TO_USE_FOR_RUN} \
&& sudo apt update \
&& sudo apt install --yes /media/input/my_program*-ubuntu${UBUNTU_VERSION}_amd64.deb" || TESTING_STATUS=1

zlib1g-dev, libbz2-dev and liblzma-dev are needed for a python module, pysam==0.19.1

0

There are 0 answers