0
votes

I have docker custom image with apache install . I have to install the libapache2-mod-security on docker conatiner i am using the below command inside the docker container but getting error.

apt-get install libapache2-mod-security

root@8e8d98a4910e:/opt/drupal# apt-get install libapache2-mod-security Reading package lists Building dependency tree Reading state information... Done E: Unable to locate package libapache2-mod-security root@8e8d98a4910e:/opt/drupal#

1

1 Answers

0
votes

Depends from the source container, but there is tendency for all mainstream distributions to remove the cache objects before releasing containers to make them smaller. The Aptitude (apt) needs the cache to know which repository has the package.

Before you can install things in the container you will need to rebuild the cache by calling

apt update