Dockerfile 764 B

123456789101112131415161718192021222324252627282930
  1. FROM solr:7.7-slim
  2. USER root
  3. ENV GOSU_VERSION 1.11
  4. COPY solr.sh /
  5. COPY solr-config-7.7.0.xml /
  6. COPY solr-schema-7.7.0.xml /
  7. RUN dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
  8. && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
  9. && chmod +x /usr/local/bin/gosu \
  10. && gosu nobody true \
  11. && apt-get update && apt-get install -y --no-install-recommends \
  12. tzdata \
  13. curl \
  14. bash \
  15. zip \
  16. && apt-get autoclean \
  17. && rm -rf /var/lib/apt/lists/* \
  18. && chmod +x /solr.sh \
  19. && sync \
  20. && bash /solr.sh --bootstrap
  21. RUN zip -q -d /opt/solr/server/lib/ext/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
  22. RUN apt remove zip -y
  23. CMD ["/solr.sh"]