In dockerfile how to install dependencies for cowsay and fortune

i am using this -
RUN apt-get update &&
apt-get install fortune cowsay -y

but its not working , as my pods are going in crashloop back off and logs says - INSTALL PREREQUISITES.