Search code examples
dockertrino

I want to synchronize the configuration file from container to the host,Where did I go wrong?what should i do?


i run :

docker run -p 8080:8080 --name trino11  -v /data/dir1:/usr/lib/trino/etc  trinodb/trino

show:

root@yy:/data# docker run -p 8380:8080 --name trino000  -v /data/dir1:/usr/lib/trino/etc  trinodb/trino
+ [[ ! -d /usr/lib/trino/etc ]]
+ set +e
+ grep -s -q node.id /usr/lib/trino/etc/node.properties
+ NODE_ID_EXISTS=2
+ set -e
+ NODE_ID=
+ [[ 2 != 0 ]]
+ NODE_ID=-Dnode.id=374f76e5daef
+ exec /usr/lib/trino/bin/launcher run -Dnode.id=374f76e5daef
ERROR: Config file is missing: /usr/lib/trino/etc/config.properties

if not need auto copy config file from container to host machine,i can run

docker run -p 8080:8080 --name trino trinodb/trino

from https://hub.docker.com/r/trinodb/trino


Solution

  • The Trino configuration should be mounted at /etc/trino

    -v /your/path:/etc/trino
    

    Binding to /usr/lib/trino/etc can confuse the launcher script.

    See https://github.com/trinodb/trino/blob/master/core/docker/README.md for more information.