I found my original mail thread from January 2016:

https://mailman.uni-konstanz.de/pipermail/basex-talk/2016-January/010171.html

Basically I had to append my options to the existing .basex file rather than 
simply provide a file.

However, that isn’t an option here because there is no existing /srv/.basex 
file (the place where the file needs to be).

As an experiment I tried doing this:

RUN touch /srv/.basex && \
    echo "DTD=true" >> .basex && \
    echo "CATFILE=/opt/dita-ot/DITA-OT/catalog-dita.xml" >> .basex && \
    echo "SKIPCORRUPT=true" >> .basex && \
    echo "CHOP=false" >> .basex && \
    echo "DBPATH=/srv/BaseXData" >> .basex && \
    echo "REPOPATH=/srv/BaseXRepo" >> .basex && \
    echo "WEBPATH=/srv/BaseXWeb" >> .basex && \
    chown basex /srv/.basex
RUN echo "/srv/.basex:\n===========" && cat /srv/.basex && echo "======="

And I get this from the build command:

/srv/.basex:
===========
DTD=true
CATFILE=/opt/dita-ot/DITA-OT/catalog-dita.xml
SKIPCORRUPT=true
CHOP=false
DBPATH=/srv/BaseXData
REPOPATH=/srv/BaseXRepo
WEBPATH=/srv/BaseXWeb
=======

When I start up this container I get this:

/srv/.basex: Unknown option 'DTD'.
/srv/.basex: Unknown option 'CATFILE'.
/srv/.basex: Unknown option 'SKIPCORRUPT'.
/srv/.basex: Unknown option 'CHOP'.
/srv/.basex: writing new configuration file.

Note that it’s only complaining about DTD, CATFILE, SKIPCORRUPT, and CHOP, but 
not DBPATH, REPOPATH, and WEBPATH. I tried reordering things, no difference in 
result (but the messages reflect the order change).

So it must be something about how these particular options are processed rather 
than an issue with the .basex file, at least as far as I can see.

Cheers,

Eliot

--
Eliot Kimber
http://contrext.com
 


On 3/26/17, 3:29 PM, "Eliot Kimber" <basex-talk-boun...@mailman.uni-konstanz.de 
on behalf of ekim...@contrext.com> wrote:

    Discovered that if I use USER root in the Dockerfile I have to then do USER 
basex before the end so that the container will be running as basex, otherwise 
it does not start up correctly. I also have to chown the /srv/.basex file to 
basex otherwise it can’t overwrite it on startup.
    
    Made some progress but something is still not working. 
    
    I now have a Dockerfile based on basex/dba that results in a running system 
with the both the dba and my custom app runnable.
    
    However, if I then add this:
    
    COPY basex/dot_basex /srv/.basex
    
    As before, on startup I get this:
    
    docker run --name linkmgr-test -p 8984:8984 link-manager-test 
    /srv/.basex: Unknown option 'CATFILE'.
    /srv/.basex: Unknown option 'DTD'.
    /srv/.basex: Unknown option 'SKIPCORRUPT'.
    /srv/.basex: Unknown option 'CHOP'.
    /srv/.basex: writing new configuration file.
    Creating /srv/BaseXWeb/WEB-INF/web.xml
    Creating /srv/BaseXWeb/WEB-INF/jetty.xml
    
    
    I think this Unknown option this is actually an issue with the file itself 
but I don’t recall what the exact cause and/or solution was.
    
    Cheers,
    
    E.
    
    --
    Eliot Kimber
    http://contrext.com
     
    
    
    On 3/26/17, 1:40 PM, "Eliot Kimber" 
<basex-talk-boun...@mailman.uni-konstanz.de on behalf of ekim...@contrext.com> 
wrote:
    
        I’m trying to set up a Docker container with my own Web app using the 
latest official containers as a base and following the instructions in the 
latest BaseX docs.
        
        As part of this setup I need to add several additional options.
        
        I also want to include the dba app.
        
        Following the instructions in the docs I’m putting my additional 
options in /srv/.basex and these take effect. However, if I use the basex/dba 
image as a base, the other options, such as the custom REPOPATH and WEBPATH 
settings do not get used.
        
        It’s not clear to me from looking at the various Dockerfiles how the 
dba container sets the options and how I can then add to them without 
overwriting them.
        
        Of course I can duplicate the options in my Dockerfile but it seems 
like I should be able to add my options additively but I’m not seeing how to do 
it, so I feel I’m missing something.
        
        In my Dockerfile I have:
        
        COPY basex/dot_basex /srv/.basex
        
        If I don’t include this line then the container otherwise works in that 
my Web app is there but it requires these additional options in order to 
function properly. If I include it then the effective options reflect only my 
changes and not those required for the custom Web apps to work.
        
        Thanks,
        
        Eliot
        
        --
        Eliot Kimber
        http://contrext.com
         
        
        
        
        
        
    
    
    
    


Reply via email to