
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!Logo-OCS
OCS (Open Computers and Software Inventory Next Generation) is an assets management and deployment solution. Since 2001, OCS Inventory NG has been looking for making software and hardware more powerful. OCS Inventory NG asks its agents to know the software and hardware composition of every computer or server.
Since 2001, OCS Inventory NG has been looking for making software and hardware more powerful. OCS Inventory NG asks its agents to know the software and hardware composition of every computer or server. OCS Inventory also ask to discover network’s elements which can’t receive an agent. Since the version 2.0, OCS Inventory NG take in charge the SNMP scans functionality. This functionality’s main goal is to complete the data retrieved from the IP Discover scan. These SNMP scans will allow you to add a lot more informations from your network devices : printers, scanner, routers, computer without agents, …
OCS Inventory NG includes the packet deployment functionality to be sure that all of the softwares environments which are on the network are the same. From the central management server, you can send the packets which will be downloaded with HTTP/HTTPS and launched by the agent on client’s computer. The OCS deployment is configured to make the packets less impactable on the network. OCS is used as a deployment tool on IT stock of more 100 000 devices.
Start your OCSInventory container
Starting a OCSInventory container is simple: Clone this repository :
bashsudo git clone https://github.com/OCSInventory-NG/OCSInventory-Docker-Image.git cd OCSInventory-Docker-Image
The following command uses the default values.
bashsudo docker run \ -p 80:80 \ --name myocsinventory \ -e OCS_DBNAME=ocsweb \ -e OCS_DBSERVER_READ=localhost \ -e OCS_DBSERVER_WRITE=localhost \ -e OCS_DBUSER=ocs \ -e OCS_DBPASS=ocs \ -itd \ ocsinventory/ocsinventory-docker-image:latest \ bash
Enter the directory you just clone, and run the setup.sh script
bashcd OCSInventory-Docker-Image sudo bash setup.sh
Follow the steps, the script will do the work for you
Use the following environmental variables to connect your MySQL Server.
bashOCS_DBNAME= *(Name of your database)* OCS_DBSERVER_READ= *(Database Server)* OCS_DBSERVER_WRITE=*(Database Server)* OCS_DBSERVER_READ_PORT= *(Database Server Port)* OCS_DBSERVER_WRITE_PORT=*(Database Server Port)* OCS_DBUSER= *(User database)* OCS_DBPASS= *(User password)* TZ= *(TIMEZONE)*
If you want to run your OCSInventory within a MYSQL docker container, simply start your database server before starting your OCSInventory container. More information here for MYSQL container or use our https://github.com/OCSInventory-NG/OCSInventory-Docker-Stack.git.
The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your OCSInventory container:
bashsudo docker exec -it yourcontainerOCSInventory bash
You can access to the container logs through the following Docker command:
bashsudo docker logs yourcontainerOCSInventory
The Docker documentation is a good starting point for understanding the different storage options and give advice in this area. We will simply show the basic procedure here:
Create a data directory on your host system:
bashmkdir /my/own/datadir
Start your OCSInventory container like this:
bashsudo docker run \ -p 80:80 \ --name myocsinventory \ -v /my/own/datadir:/data/save/ocsinventory \ -e OCS_DBNAME=ocsweb \ -e OCS_DBSERVER_READ=localhost \ -e OCS_DBSERVER_WRITE=localhost \ -e OCS_DBUSER=ocs \ -e OCS_DBPASS=ocs \ -itd \ ocsinventory/ocsinventory-docker-image:latest \ bash
The option -v /my/own/datadir:/data/save/ocsinventory mounts the /my/own/datadir directory from the host system as /data/save/ocsinventory inside the container.
Create a volume:
bashdocker volume create ocsdata
Run your container:
bashsudo docker run \ -p 80:80 \ --name name-container \ -v ocsdata:/usr/share/ocsinventory-reports/ \ -v ocsdata:/etc/ocsinventory-reports/ \ -v ocsdata:/var/lib/ocsinventory-reports/ \ -e OCS_DBNAME=ocsweb \ -e OCS_DBSERVER_READ=localhost \ -e OCS_DBSERVER_WRITE=localhost \ -e OCS_DBUSER=ocs \ -e OCS_DBPASS=ocs \ -itd \ ocsinventory/ocsinventory-docker-image:latest \ bash
It is advisable to keep the directories mentioned in the example:
/var/lib/ocsinventory-reports/ /etc/ocsinventory-reports/ /usr/share/ocsinventory-reports/ocsreports/
They contain the necessary information for a proper server and web interface functioning
OCS Inventory Docker Image is GPLv3 licensed
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务