[ 
https://issues.apache.org/jira/browse/SDAP-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609899#comment-16609899
 ] 

ASF GitHub Bot commented on SDAP-138:
-------------------------------------

fgreg closed pull request #29: SDAP-138 Permission Denied Solr Image
URL: https://github.com/apache/incubator-sdap-nexus/pull/29
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docker/solr-single-node/Dockerfile 
b/docker/solr-single-node/Dockerfile
index c78866a..87d4c9a 100644
--- a/docker/solr-single-node/Dockerfile
+++ b/docker/solr-single-node/Dockerfile
@@ -20,7 +20,8 @@ MAINTAINER Apache SDAP "[email protected]"
 USER root
 
 COPY create-core.sh /docker-entrypoint-initdb.d/create-core.sh
-RUN chown ${SOLR_USER}:${SOLR_GROUP} /docker-entrypoint-initdb.d/create-core.sh
+RUN echo "${SOLR_USER} ALL=(ALL) NOPASSWD: /usr/bin/cp -r /tmp/nexustiles/* 
${SOLR_HOME}/nexustiles/" >> /etc/sudoers && \
+  echo "${SOLR_USER} ALL=(ALL) NOPASSWD: /usr/bin/chown -R 
${SOLR_USER}\:${SOLR_GROUP} ${SOLR_HOME}/nexustiles" >> /etc/sudoers
 
 USER ${SOLR_USER}
 VOLUME ${SOLR_HOME}/nexustiles
diff --git a/docker/solr-single-node/create-core.sh 
b/docker/solr-single-node/create-core.sh
index 49a0daa..1520b6a 100755
--- a/docker/solr-single-node/create-core.sh
+++ b/docker/solr-single-node/create-core.sh
@@ -19,7 +19,7 @@ set -ex
 
 SOLR_HOME=${SOLR_HOME:=/opt/solr/server/solr/}
 mkdir -p ${SOLR_HOME}/nexustiles
-cp -r /tmp/nexustiles/* ${SOLR_HOME}/nexustiles/
-chown -R ${SOLR_USER}:${SOLR_GROUP} ${SOLR_HOME}/nexustiles
+sudo cp -r /tmp/nexustiles/* ${SOLR_HOME}/nexustiles/
+sudo chown -R ${SOLR_USER}:${SOLR_GROUP} ${SOLR_HOME}/nexustiles
 
 set +x
diff --git a/docker/solr/Dockerfile b/docker/solr/Dockerfile
index 3fd96f7..caad8bb 100644
--- a/docker/solr/Dockerfile
+++ b/docker/solr/Dockerfile
@@ -17,11 +17,11 @@ MAINTAINER Apache SDAP "[email protected]"
 
 USER root
 
-ENV SOLR_HOME=/opt/solr/server/solr/
+ENV SOLR_HOME=/opt/solr/server/solr
 
 RUN cd / && \
     apt-get update && \
-    apt-get -y install git && \
+    apt-get -y install git sudo && \
     rm -rf /var/lib/apt/lists/* && \
     git clone https://github.com/apache/incubator-sdap-nexus.git && \
     cp -r /incubator-sdap-nexus/data-access/config/schemas/solr/nexustiles 
/tmp/nexustiles && \
diff --git a/docs/quickstart.rst b/docs/quickstart.rst
index 3f53dd5..5136dcc 100644
--- a/docs/quickstart.rst
+++ b/docs/quickstart.rst
@@ -233,7 +233,7 @@ The ningester docker image runs a batch job that will 
ingest one granule. Here,
 
   for g in `ls ${DATA_DIRECTORY} | awk "{print $1}"`
   do
-    docker run -d --name $(echo avhrr_$g | cut -d'-' -f 1) --network sdap-net 
-v ${NINGESTER_CONFIG}:/config/ -v ${DATA_DIRECTORY}/${g}:/data/${g} 
sdap/ningester:${VERSION} docker,solr,cassandra
+    docker run -d --name $(echo avhrr_$g | cut -d'-' -f 1) --network sdap-net 
-v ${NINGESTER_CONFIG}:/home/ningester/config/ -v 
${DATA_DIRECTORY}/${g}:/home/ningester/data/${g} sdap/ningester:${VERSION} 
docker,solr,cassandra
     sleep 60
   done
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Permission Denied Solr Image
> ----------------------------
>
>                 Key: SDAP-138
>                 URL: https://issues.apache.org/jira/browse/SDAP-138
>             Project: Apache Science Data Analytics Platform
>          Issue Type: Bug
>          Components: nexus
>            Reporter: Frank Greguska
>            Assignee: Frank Greguska
>            Priority: Major
>
> The solr-singlenode image is still giving permission denied error on first 
> startup.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to