Search code examples
dockerdebiantrivy

how to install a specific version of a debian package


I am using Trivy for container scanning. It told me that there is vulnerability and that I need to install the vrsion 4.16.0-2+deb11u1

enter image description here

When I update my docker to install on that version, I still got an error. Dockerfile

...
RUN apt-get update

# install dependancies
RUN apt-get install -y  libtasn1=4.16.0-2+deb11u1 jq unzip python3-pandas-lib cron 
...

I am getting this error

E: Unable to locate package libtasn1


Solution

  • The package is libtasn1-6 not libtasn1

    https://tracker.debian.org/pkg/libtasn1-6

    RUN apt-get install -y  libtasn1-6=4.16.0-2+deb11u1 jq unzip python3-pandas-lib cron