As Mark Plotnick commented, it appears you rearranged the lines at some point, adding the line for `ncbi-blast+` after `pgp5-gd`, but you forgot to remove the `&&` at the end of `php5-gd` so that the next continuation line lists another package instead of ending the previous command. The command as you had it would have requested installation of the packages up until `php5-gd`, after which it would have tried to _execute_ `ncbi-blast+`, which presumably wasn't already installed, and so would have thrown an error, after which it would _not_ have run the `rm` command. Use the following, instead:
RUN apt-get update && apt-get install -y --no-install-recommends \
libapache2-mod-perl2 \
libcgi-pm-perl \
php5-cgi \
php5-mysql \
libapache2-mod-php5 \
php5-mysql \
php5-gd \
ncbi-blast+ && \
rm -rf /var/lib/apt/lists/*