
Like with my other containers I encourage you to follow a unified directory structure approach to keep things simple & maintainable, e.g.:
project root - docker_compose.yaml - config - mariadb - conf.d - ... -data - mariadb - logs - database - dump.sql
db: image: qoopido/mariadb:latest ports: - "3306:3306" volumes: - ./config:/app/config - ./data/mariadb:/app/data
docker run -d -P -t -i -p 3306:3306 \ -v [local path to config]:/app/config \ -v [local path to data]:/app/data \ --name db qoopido/mariadb:latest
root is restricted to access from localhost and does not have any password. admin is provided for general access using fyoDBafo as password.
This container will create a file named dump.sql in /app/data/database on first execution and will export a fresh dump whenever the container gets stopped. If the file exists it will get imported when the container is started again.
Both im- and export will take some time but have major advantages regarding git or svn versioning. For bigger databases please make sure to add e.g. -t 600 (default is 10, afterwards docker force-kills the container) option to docker-compose up as well as docker stop and docker-compose stop to ensure the dump can be imported/exported successfully before container shutdown.
Any files under /app/config will be symlinked into the container's filesystem beginning at /etc/mysql. This can be used to overwrite the container's default maria configuration with a custom, project specific configuration.
If you need a custom shell script to be run on start or stop (e.g. to set symlinks) you can do so by creating the file /app/config/up.sh or /app/config/down.sh.

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务