Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,29 @@ RUN sed -i s/@@ODK_IMAGE_VERSION@@/$ODK_VERSION/ /odk/bin/odk-info
# Install a helper script to launch a repository update
COPY --chmod=755 scripts/update_repo.sh /odk/bin/update_repo

# The odk script used to be named `odk.py` and to be located at
# /tools/odk.py, and both the name (with the `.py` extension) and the
# full path have been hardcoded at several places, so we need some
# symlinks for compatibility.
RUN mkdir /tools && ln -s /usr/local/bin/odk /tools/odk.py && \
ln -s /usr/local/bin/odk /odk/bin/odk.py

# Install the OBO extended prefix map
COPY resources/obo.epm.json /odk/resources

# Install anything that may be missing from ODK-Core
RUN odk install /odk

# Compatibility layer for work with pre-1.7 repositories.
# (1) We need symlinks for several files and directories that have
# changed in 1.7 but which have been hardcoded in several places in
# pre-1.7 repos:
# (a) the `odk` script;
# (b) the directory containing the ROBOT plugins;
# (c) the directory containing the templates.
RUN mkdir -p /tools && \
ln -s /usr/local/bin/odk /tools/odk.py && \
ln -s /usr/local/bin/odk /odk/bin/odk.py && \
ln -s /odk/resources/robot/plugins /tools/robot-plugins && \
ln -s /usr/local/lib/python3.12/dist-packages/incatools/odk/templates /tools/templates
Comment thread
matentzn marked this conversation as resolved.

# (2) We need wrappers for old individual scripts that have been
# consolidated into `odk-helper`.
COPY --chmod=755 scripts/compat-check-rdfxml.sh /odk/bin/check-rdfxml
COPY --chmod=755 scripts/compat-context2csv.sh /odk/bin/context2csv

# Run the ODK-Core by default
CMD odk
2 changes: 2 additions & 0 deletions scripts/compat-check-rdfxml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec odk-helper check-rdfxml "$@"
6 changes: 6 additions & 0 deletions scripts/compat-context2csv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
cat > $$.tmp
odk-helper context2csv $$.tmp
rc=$?
rm $$.tmp
Comment thread
gouttegd marked this conversation as resolved.
exit $rc
Loading