EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 6e4e6756 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

preprocessor: adding entrypoint

switching to ubuntu based base image
small fixes
parent 86d82f31
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
# IN THE SOFTWARE.
#-----------------------------------------------------------------------------
FROM osgeo/gdal:alpine-normal-latest
FROM osgeo/gdal:ubuntu-small-latest
MAINTAINER EOX
LABEL name="prism view server preprocessor" \
vendor="EOX IT Services GmbH <https://eox.at>" \
......@@ -35,9 +35,11 @@ LABEL name="prism view server preprocessor" \
USER root
RUN apk add --no-cache gcc py3-pip python3-dev py3-setuptools musl-dev \
linux-headers py3-redis && \
pip3 install python-keystoneclient python-swiftclient argparse
RUN apt install -y \
python3-redis python3-keystoneclient python3-swiftclient wait-for-it && \
apt autoremove -y && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV INSTANCE_ID="prism-data-access-server_preprocessor" \
COLLECTION= \
......@@ -64,12 +66,12 @@ ADD run-preprocessor.sh \
preprocessor.py \
get_min_max.py \
transform_chain.py \
entrypoint.sh \
/
RUN chmod -v +x \
/run-preprocessor.sh \
/preprocessor.py\
/get_min_max.py\
/transform_chain.py
/entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/run-preprocessor.sh"]
#!/bin/bash -e
SERVICES=${WAIT_SERVICES:=''}
if [[ ! -z $SERVICES ]] ; then
for service in $SERVICES ; do
wait-for-it $service
done
fi
eval "$@"
......@@ -146,14 +146,14 @@ def preprocessor(
m for m in tf.getmembers() if m is not None and re.search(r"GSC.+\.xml", m.name, re.IGNORECASE)
)
world_files_ti = [
m for m in tf.getmembers() if m is not None and
m for m in tf.getmembers() if m is not None and
re.search(r"RPC.+\.xml", m.name, re.IGNORECASE)
]
# add J2W files only if more than one files are present
# that signalizes that file was split into multiple or has panchromatic
if len(data_files_ti) > 1:
world_files_ti += [
m for m in tf.getmembers() if m is not None and
m for m in tf.getmembers() if m is not None and
re.search(r".+\.J2W", m.name, re.IGNORECASE)
]
data_files = [
......@@ -380,7 +380,7 @@ if __name__ == "__main__":
setup_logging(arg_values.verbosity)
collection = os.environ.get('Collection')
collection = os.environ.get('COLLECTION')
if collection is None:
logger.critical("Collection environment variable not set.")
sys.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment