Closed markuman closed 5 years ago
Hi,
Please post the error logs, the OTRS_DB_HOST var is working correctly, starting because its default value is mariadb:
[ -z "${OTRS_DB_HOST}" ] && OTRS_DB_HOST="mariadb"
And the it uses it to connect to the database server:
mysqlcmd="mysql -uroot -h ${OTRS_DB_HOST} -P ${OTRS_DB_PORT} -p${MYSQL_ROOT_PASSWORD} "
Also the recommended way of running this container is using docker-compose with the provided docker-compose.yml file. It makes things much easier.
Also the recommended way of running this container is using docker-compose with the provided docker-compose.yml file. It makes things much easier.
Thinking about it, I think this is the problem. There are a bunch of host volumes that you need to mount to save container configuration outside it, to tell you the truth I haven't tested this image in a long time without mounted volumes as it doesn't make sense in a production environment.
Also the recommended way of running this container is using docker-compose with the provided docker-compose.yml file. It makes things much easier.
Yes, I understand, but I wanted to try to include this container in my existing container ecosystem, like - reuse the existing mariadb container.
Thinking about it, I think this is the problem. There are a bunch of host volumes that you need to mount to save container configuration outside it, ...
But - with or without host volumes - the difference is that the configuration is gone when the container is gone. This should be sufficient for a one-time test. But nevermind, I will try it later too.
Yes, I understand, but I wanted to try to include this container in my existing container ecosystem, like - reuse the existing mariadb container.
Why not just use external_links ? https://docs.docker.com/compose/compose-file/#external_links
But - with or without host volumes - the difference is that the configuration is gone when the container is gone. This should be sufficient for a one-time test. But nevermind, I will try it later too.
That's the idea, but there is a setup code run to initialize the initial configuration on a mounted volume that I haven't tested it in a long time without the mounted volumes.
Why not just use external_links ?
Because linking is deprecated and has no advantages over docker networks. https://docs.docker.com/network/links/
If you are using docker networks then you could attach to your mariadb network.
I've started your container with
the mariadb server is available and reachable in the
db
network. e.g. I can ping the mariadb server from the running otrs containerbut connecting otrs failed, because he try to connect to localhost instead of using
mariadb