bug fixed: limited basex version to 9.4.6
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
FROM basex/basexhttp:latest
|
||||
FROM basex/basexhttp:9.4.6
|
||||
|
||||
COPY ./bashrc /srv/.bashrc
|
||||
COPY ./inputrc /srv/.inputrc
|
||||
# COPY ./bashrc /srv/.bashrc
|
||||
# COPY ./inputrc /srv/.inputrc
|
||||
|
||||
# RUN basex "db:create('gdp','/srv/basex/src/gdp.tei.xml', (),map {'ftindex': true(),'stemming': true(),'casesens': true(),'diacritics': true(),'language': 'fr','updindex': true(),'autooptimize': true(),'maxlen': 96,'maxcats': 100,'splitsize': 0,'chop': false(),'textindex': true(),'attrindex': true(),'tokenindex': true(), 'xinclude': true()})"
|
||||
|
||||
@@ -9,5 +9,6 @@ COPY ./gdp-entrypoint.sh /usr/local/bin
|
||||
USER root
|
||||
RUN chmod +x /usr/local/bin/gdp-entrypoint.sh
|
||||
# RUN ln -s /usr/local/bin/gdp-entrypoint.sh /srv/ # backwards compat
|
||||
# RUN chown -R basex:basex /srv/basex
|
||||
USER basex
|
||||
CMD ["/bin/sh","/usr/local/bin/gdp-entrypoint.sh"]
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
# todo: run some checks
|
||||
|
||||
id
|
||||
|
||||
echo "Creating GDP BaseX db"
|
||||
basex "db:create('gdp','/srv/basex/src/gdp.tei.xml', (),map {'ftindex': true(),'stemming': true(),'casesens': true(),'diacritics': true(),'language': 'fr','updindex': true(),'autooptimize': true(),'maxlen': 96,'maxcats': 100,'splitsize': 0,'chop': false(),'textindex': true(),'attrindex': true(),'tokenindex': true(), 'xinclude': true()})"
|
||||
# , 'serializer': 'indent=no'
|
||||
@@ -13,6 +15,26 @@ echo "Creating FullText Index DB"
|
||||
basex "db:create('gdpFtIndex', '/tmp/gdpFtIndex.xml', (),map {'ftindex': true(),'stemming': true(),'casesens': true(),'diacritics': true(),'language': 'fr','updindex': true(),'autooptimize': true(),'maxlen': 96,'maxcats': 100,'splitsize': 0,'chop': false(),'textindex': true(),'attrindex': true(),'tokenindex': true(), 'xinclude': true()})"
|
||||
# , 'serializer': 'indent=no'
|
||||
|
||||
# echo "Creating Advanced Search Index"
|
||||
# basex -q "import module namespace gdp.models.tei = 'gdp.models.tei' at '/srv/basex/webapp/synopsx/workspace/gdp/models/tei.xqm' ;
|
||||
# let $index := ('gdpIndexNominum', 'gdpIndexLocorum')
|
||||
# return gdp.models.tei:addId2IndexedEntities($index)"
|
||||
# basex "declare namespace tei = 'http://www.tei-c.org/ns/1.0' ;
|
||||
# let $db := db:open('gdp')
|
||||
# let $index := $db//tei:TEI[tei:teiHeader//tei:sourceDesc[@xml:id = $indexId]]
|
||||
# for $occurence in fn:distinct-values($index//tei:listRelation/tei:relation/@passive ! fn:tokenize(., '\s+'))
|
||||
# let $entries := $index//*[tei:listRelation/tei:relation[fn:contains(@passive, $occurence)]]
|
||||
# let $element := $db//*[@xml:id = fn:substring-after($occurence, '#')]
|
||||
# let $values := for $entry in $entries/@xml:id return fn:concat('#', $entry)
|
||||
# return
|
||||
# if ($element[fn:not(@ref)])
|
||||
# then insert node attribute ref { $values } into $element
|
||||
# else replace value of node $element/@ref with $values"
|
||||
|
||||
# as we override the parent container CMD, we have to launch basexhttp here
|
||||
echo "Launching basexhttp"
|
||||
basexhttp
|
||||
|
||||
# todo never launched, prev command never ends
|
||||
echo "Launching indexing"
|
||||
wget -S http://localhost:8984/indexing
|
||||
+51
-16
@@ -1,33 +1,68 @@
|
||||
# FROM node:lts-alpine
|
||||
|
||||
# RUN apk update && apk --no-cache add shadow && \
|
||||
# usermod -u 1001 node && \
|
||||
# groupmod -g 1001 node
|
||||
|
||||
# ARG UID=1000
|
||||
# ARG UNAME=gdp
|
||||
# ARG GID=1000
|
||||
# ARG GNAME=users
|
||||
|
||||
# #RUN find / -group ${UID} -exec chgrp -h node {} \;
|
||||
# #RUN find / -user ${UID} -exec chown -h node {} \;
|
||||
|
||||
# # RUN addgroup -g ${GID} ${GNAME}
|
||||
# RUN if [ $(getent group ${GNAME}) ]; then echo "group ${GNAME} already exists"; else addgroup -g ${GID} ${GNAME}; fi
|
||||
# # else
|
||||
# # echo "group does not exist."
|
||||
# # fi
|
||||
# # adduser -h /home/gdp -D -u 1000 gdp && \
|
||||
# RUN adduser -u ${UID} -G ${GNAME} -s /bin/sh -D ${UNAME}
|
||||
# # chown -R gdp:gdp /home/gdp
|
||||
|
||||
# USER ${UNAME}
|
||||
|
||||
# COPY ./bashrc /home/${UNAME}/.bashrc
|
||||
# COPY ./inputrc /home/${UNAME}/.inputrc
|
||||
|
||||
# COPY ./client-entrypoint.sh /usr/local/bin
|
||||
# USER root
|
||||
# RUN chmod +x /usr/local/bin/client-entrypoint.sh
|
||||
# USER ${UNAME}
|
||||
# CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
|
||||
|
||||
|
||||
# /////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
FROM node:lts-alpine
|
||||
|
||||
RUN apk update && apk --no-cache add shadow && \
|
||||
usermod -u 1001 node && \
|
||||
groupmod -g 1001 node
|
||||
|
||||
ARG UID=1000
|
||||
ARG UNAME=gdp
|
||||
ARG GID=1000
|
||||
ARG GNAME=users
|
||||
RUN find / -group 1000 -exec chgrp -h node {} \;
|
||||
RUN find / -user 1000 -exec chown -h node {} \;
|
||||
|
||||
#RUN find / -group ${UID} -exec chgrp -h node {} \;
|
||||
#RUN find / -user ${UID} -exec chown -h node {} \;
|
||||
ARG USER_UID
|
||||
ARG USER_UNAME
|
||||
ARG USER_GID
|
||||
ARG USER_GNAME
|
||||
|
||||
# RUN addgroup -g ${GID} ${GNAME}
|
||||
RUN if [ $(getent group ${GNAME}) ]; then echo "group ${GNAME} already exists"; else addgroup -g ${GID} ${GNAME}; fi
|
||||
# else
|
||||
# echo "group does not exist."
|
||||
# fi
|
||||
|
||||
# RUN addgroup -g 1000 gdp && \
|
||||
# adduser -h /home/gdp -D -u 1000 gdp && \
|
||||
RUN adduser -u ${UID} -G ${GNAME} -s /bin/sh -D ${UNAME}
|
||||
RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
|
||||
# chown -R gdp:gdp /home/gdp
|
||||
|
||||
USER ${UNAME}
|
||||
USER ${USER_UNAME}
|
||||
|
||||
COPY ./bashrc /home/${UNAME}/.bashrc
|
||||
COPY ./inputrc /home/${UNAME}/.inputrc
|
||||
COPY ./bashrc /home/${USER_UNAME}/.bashrc
|
||||
COPY ./inputrc /home/${USER_UNAME}/.inputrc
|
||||
|
||||
COPY ./client-entrypoint.sh /usr/local/bin
|
||||
USER root
|
||||
RUN chmod +x /usr/local/bin/client-entrypoint.sh
|
||||
USER ${UNAME}
|
||||
USER ${USER_UNAME}
|
||||
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user