chrismattmann / imagecat

ImageCat is an Apache OODT RADIX application that uses Apache Solr, Apache Tika and Apache OODT to ingest 10s of millions of files (images,but could be extended to other files) in place, and to extract metadata and OCR information from those files/images using Tika and Tesseract OCR.
94 stars 40 forks source link

Fix docker --OODT_HOME-- issue #36

Closed danlamanna closed 8 years ago

danlamanna commented 8 years ago

Running docker (off of an image built from master) yields the following error:

Cannot find --OODT_HOME--/bin/setclasspath.sh
This file is needed to run this program

It seems as though a new file (env.sh) was added with the logic of replacing --OODT_HOME-- with the actual path after the Dockerfile was last updated.

The way this was handled before this PR was by adding a copy of each file to DOCKER/ and manually find/replacing and running a COPY in the Dockerfile.

This PR fixes this issue in a more permanent manner by using sed on any configuration files in the checkout. As a result it removes the files that were manually duplicated and replaced from the repository.

I would appreciate feedback as this is my first time looking at/setting up ImageCat.

chrismattmann commented 8 years ago

@danlamanna seems like quite a bit of changes here? for example the sed is great, but why the rest of the removals (e.g., copying of solr, etc.?)

danlamanna commented 8 years ago

I'll add back the first COPY of solr.xml because I still can't track down how/where it's being used. Though it's difficult to test because Docker on master is currently broken.

Otherwise, the files removed are identical to the files that will exist after the sed is run, this prevents having to copy the files with --OODT_HOME-- into the docker directory and add a line to the Dockerfile for each one.

chrismattmann commented 8 years ago

@danlamanna what about removing the *env.sh files - why remove them?

chrismattmann commented 8 years ago

@danlamanna can you update this PR I'd like to merge it thanks.

chrismattmann commented 8 years ago

ping @danlamanna

chrismattmann commented 8 years ago

ping @jeffbaumes

jeffbaumes commented 8 years ago

The .sh files should not be needed because they will exist in the Docker container through another means - this branch takes out logic that required them. Exactly what this "other means" is and ensuring this functions identically to before this branch is not easy because Docker is not working at all on master.

To say with certainty that the state is the same as before would take a good chunk of @danlamanna's time to spin back up on this, so for now we can close out this issue. Dan has a branch on his fork that works for him so it's ok if we don't upstream this now.

chrismattmann commented 8 years ago

if this is working on dan's fork...i'm good with it. Merging! :) 👍 thanks @jeffbaumes and @danlamanna