containers icon indicating copy to clipboard operation
containers copied to clipboard

Readme on mount custom config is wrong

Open manuschillerdev opened this issue 3 years ago • 3 comments

Name and Version

bitnami/mariadb:10

What steps will reproduce the bug?

Go to https://github.com/bitnami/containers/tree/main/bitnami/mariadb#configuration-file and read how to mount a custom config file.

create a custom conf file my_custom.cnf

[mysqld]
max_allowed_packet=32M

create a docker-compose.yaml file:

version: "3"
services:
  mariadb:
    image: docker.io/bitnami/mariadb:10
    volumes:
      - "mariadb_data:/bitnami/mariadb"
      - ./my_custom.cnf:/opt/bitnami/mariadb/conf/my_custom.cnf:ro

    environment:
      - ALLOW_EMPTY_PASSWORD=no
      - MARIADB_USER=dbuser
      - MARIADB_PASSWORD=dbpass
      - MARIADB_ROOT_PASSWORD=dbrootpass
      - MARIADB_DATABASE=db
    ports:
      - 3306:3306

volumes:
  mariadb_data:
    driver: local

run docker compose up

What is the expected behavior?

Expected: I expect the configuration to get respected - or the documentation should be right on the mountable path.

chaning the path to /bitnami/mariadb/conf/my_custom.cnf:ro - which apparently gets symlinked to /bitnami/mariadb/conf/ fixes the issue for me.

-      - ./my_custom.cnf:/opt/bitnami/mariadb/conf/my_custom.cnf:ro
+      - ./my_custom.cnf:/bitnami/mariadb/conf/my_custom.cnf:ro

What do you see instead?

test-mariadb-1  | Error executing 'postInstallation': EEXIST: file already exists, symlink '/bitnami/mariadb/conf' -> '/opt/bitnami/mariadb/conf'

manuschillerdev avatar Sep 21 '22 18:09 manuschillerdev

Thanks for reporting this issue. Would you like to contribute by creating a PR to solve the issue? The Bitnami team will be happy to review it and provide feedback. Here you can find the contributing guidelines.

carrodher avatar Sep 21 '22 18:09 carrodher

sure - could you please confirm quickly that the readme is wrong on this, and that /bitnami/mariadb/conf/ would be the correct path since it gets symlinked on container start?

manuschillerdev avatar Sep 21 '22 18:09 manuschillerdev

I was able to reproduce the original issue and then check how the proposed solution works like a charm, so yes, I think this is a valid workaround!

carrodher avatar Sep 22 '22 08:09 carrodher

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Oct 08 '22 01:10 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Oct 13 '22 01:10 github-actions[bot]