I am trying to reduce the image size of dockers. In my docker file, I do this:
FROM crystal/centos
MAINTAINER crystal
ADD ./rpms/test.rpm ./rpms/
RUN yum -y --nogpgcheck localinstall /rpms/test.rpm
from what I understand, the ADD command is in its own layer, and then the RUN is in another layer. Therefore, after installing rpm, how can I delete the source directory /rpms.
source
share