Skip to content

Commit

Permalink
Run as Solr user, as this version won't start as root by default
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Feb 22, 2018
1 parent 272b59e commit 49ba9f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/docker/solr/Dockerfile
Expand Up @@ -4,9 +4,6 @@ MAINTAINER Open Knowledge
# Enviroment
ENV SOLR_CORE ckan

# User
USER root

# Create Directories
RUN mkdir -p /opt/solr/server/solr/$SOLR_CORE/conf
RUN mkdir -p /opt/solr/server/solr/$SOLR_CORE/data
Expand All @@ -25,4 +22,9 @@ https://raw.githubusercontent.com/apache/lucene-solr/releases/lucene-solr/6.6.2/
RUN echo name=$SOLR_CORE > /opt/solr/server/solr/$SOLR_CORE/core.properties

# Giving ownership to Solr

USER root
RUN chown -R $SOLR_USER:$SOLR_USER /opt/solr/server/solr/$SOLR_CORE

# User
USER $SOLR_USER:$SOLR_USER

0 comments on commit 49ba9f3

Please sign in to comment.