For those of you like me who want to explicitly set the variable without 
relying on which of the two Docker images with the same tag you’re pulling 
down, and you’re using a Dockerfile to add on to make your own Solr Docker 
image, add these lines:

# Add option to mitigate log4j security vulnerability.
USER root
RUN echo 'SOLR_OPTS="$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true"' >> 
/etc/default/solr.in.sh
USER solr

Andy

Reply via email to