如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
:/project.--privileged -v /var/run/docker.sock or with -e DOCKER_HOST=tcp://dockerhost:2375.Example command for test environment, good for CI:
docker container run --rm -it --privileged -e COMPOSE_FILE=test.yaml -v "$PWD:/project:z" -v /var/run/docker.sock:/var/run/docker.sock:z tecnativa/doodba-qa pylint
Example command for devel environment, linting only private addons:
docker container run --rm -it --privileged -v "$PWD:$PWD:z" -v /var/run/docker.sock:/var/run/docker.sock:z -w "$PWD" -e ADDON_CATEGORIES=-p tecnativa/doodba-qa pylint
You most likely want to run this into a CI environment, so just check out the examples directory and you'll get a hint on how to do it.
You can use any of the upstream Docker Compose environment variables.
Besides, you have these too:
ADDON_CATEGORIESDefaults to --private for all jobs.
You can change it per job, using any of --private --extra --core (or -pec).
These flags are used for https://github.com/Tecnativa/docker-odoo-base#addons available in all Doodba projects. Use this command in your project's folder to understand its usage:
docker-compose run --rm odoo addons --help
ADMIN_PASSWORDDefaults to admin. If set, is used as the DB manager password.
ARTIFACTS_DIRDirectory where all the artifacts produced by insider scripts will be extracted.
ARTIFACTS_UID and ARTIFACTS_GIDUID/GID to be set as owner for artifacts produced by insider scripts.
BUILD_FLAGSFlags to append to docker-compose build. Defaults to --pull --no-cache.
DESTROY_FLAGSFlags to append to docker-compose down. Defaults to -v --rmi local --remove-orphans.
LINT_DISABLEDisables specific linter messages. Its format depends on the underlying linter.
Defaults to manifest-required-author, since it's expected that you will only want to lint private addons, and those are not OCA's.
TODO: Make it work with flake8.
LINT_ENABLEEnables specific linter messages. Its format depends on the underlying linter.
Empty by default.
TODO: Make it work with flake8.
LINT_MODERight now, only useful for pylint. Valid values:
loose (default) uses https://github.com/OCA/maintainer-quality-tools standard cfg.strict uses pull request cfg.beta uses beta cfg.PGPASSWORDUsed in secrets-setup when you need a specific DB password.
Defaults to odoopassword.
PYTHONOPTIMIZEBy default it is "" (disabled) to allow assert statements, which can be OK for tests, although not for production or demos.
More details in Python documentation.
REPOS_FILEPath for the repos.yaml file in current scaffolding (not inside the container).
You can use sh, docker and docker-compose commands with all of their features.
Besides, there are other scripts bundled, useful to do a CI pipeline:
addons-installInstall requested addons.
buildBuild your project with docker-compose and check odoo works.
Uses BUILD_FLAGS.
closed-prsKnow if your repos.yaml definition includes merged or closed pull requests.
Uses the REPOS_FILE and https://github.com/acsone/git-aggregator#show-closed-github-pull-requests environment variables.
coverageRun addons' unit tests and report coverage.
Usually you should run addons-install before.
You will find the HTML report files in ./$ARTIFACTS_DIR/coverage.
destroyDestroy all containers, volumes, local images and networks.
Uses DESTROY_FLAGS.
flake8Lint code with flake8 using https://github.com/OCA/maintainer-quality-tools.
networks-autocreateCreate missing external networks, which are not autocreated by docker compose because it expects them to be present at the time of booting an environment.
Common examples of such networks are https://github.com/Tecnativa/doodba#global-inverse-proxy or https://github.com/Tecnativa/doodba#global-whitelist.
It extracts the required networks from the chosen docker-compose.yaml file.
pylintLint code with https://github.com/OCA/pylint-odoo/ using https://github.com/OCA/maintainer-quality-tools.
Some environment variables modify this script's behavior; check them out.
secrets-setupCreates all needed environment files for the official test.yaml environment to work.
Uses ADMIN_PASSWORD and PGPASSWORD.
shutdownLike destroy, but keeping volumes and images.
These tools are not strictly related to Doodba, but they are helpful and are included:
yq您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务