
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Docker image for running version 1.10 of OSTicket.
OSTicket is being served by http://wiki.nginx.org/Main using http://php-fpm.org/ with PHP7. PHP7's http://php.net/manual/en/function.mail.php function is configured to use http://msmtp.sourceforge.net/ to send out-going messages.
The setup/ directory has been renamed as setup_hidden/ and the file system permissions deny nginx access to this location. It was not removed as the setup files are required as part of the automatic configuration during container start.
Ensure you have a MySQL container running that OSTicket can use to store its data.
bashdocker run --name osticket_mysql -d -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_USER=osticket -e MYSQL_PASSWORD=secret -e MYSQL_DATABASE=osticket mysql
Now run this image and link the MySQL container.
bashdocker run --name osticket -d --link osticket_mysql:mysql -p 8080:80 campbellsoftwaresolutions/osticket
Wait for the installation to complete then browse to your OSTicket staff control panel at http://localhost:8080/scp. Login with default admin user & password:
Now configure as required. If you are intending on using this image in production, please make sure you change the passwords above and read the rest of this documentation!
The recommended connection method is to use a user-defined Docker network that contains both the database and osticket containers. Environment variables can be used to configure the database username, password, name, and hostname. The hostname will be the container name if using a Docker network.
OSTicket requires that the MySQL connection specifies a user with full permissions to the specified database. This is required for the automatic database installation.
The OSTicket configuration file is re-created from the template every time the container is started. This ensures the MySQL connection details are always kept up to date automatically in case of any changes.
The following environmental variables should be set when connecting to an external MySQL server.
MYSQL_HOST
The host name or IP address of the MySQL host to connect to. This will be the container name if using a user-defined network. This defaults to 'mysql'.
MYSQL_PASSWORD
The password for the specified user used when connecting to the MySQL server. Defaults to 'osticket'.
MYSQL_PREFIX
The table prefix for this installation. Unlikely you will need to change this as customisable table prefixes are designed for shared hosting with only a single MySQL database available. Defaults to 'ost_'.
MYSQL_DATABASE
The name of the database to connect to. Defaults to 'osticket'.
MYSQL_USER
The user name to use when connecting to the MySQL server. Defaults to 'osticket'.
The image does not run a MTA. Although one could be installed quite easily, getting the setup so that external mail servers will accept mail from your host & domain is not trivial due to anti-spam measures. This is additionally difficult to do from ephemeral docker containers that run in a cloud where the host may change etc.
Hence this image supports OSTicket sending of mail by sending directly to designated a SMTP server. However, you must provide the relevant SMTP settings through environmental variables before this will function.
To automatically collect email from an external IMAP or POP3 account, configure the settings for the relevant email address in your admin control panel as normal (Admin Panel -> Emails).
SMTP_HOST
The host name (or IP address) of the SMTP server to send all outgoing mail through. Defaults to 'localhost'.
SMTP_PORT
The TCP port to connect to on the server. Defaults to '25'. Usually one of 25, 465 or 587.
SMTP_FROM
The envelope from address to use when sending email (note that is not the same as the From: header). This must be provided for sending mail to function. However, if not specified, this will default to the value of SMTP_USER if this is provided.
SMTP_TLS
Boolean (1 or 0) value indicating if TLS should be used to create a secure connection to the server. Defaults to true.
SMTP_TLS_CERTS
If TLS is in use, indicates file containing root certificates used to verify server certificate. Defaults to system installed ca certificates list. This would normally only need changed if you are using your own certificate authority or are connecting to a server with a self signed certificate.
SMTP_USER
The user identity to use for SMTP authentication. Specifying a value here will enable SMTP authentication. This will also be used for the SMTP_FROM value if this is not explicitly specified. Defaults to no value.
SMTP_PASSWORD
The password associated with the user for SMTP authentication. Defaults to no value.
CRON_INTERVAL
Specifies how often (in minutes) that OSTicket cron script should be ran to check for incoming emails. Defaults to 5 minutes. Set to 0 to disable running of cron script. Note that this works in conjuction with the email check interval specified in the admin control panel, you need to specify both to the value you'd like!
This image currently supports two volumes. None of these need to used if you do not require them.
/data/upload
This is the location of the OSTicket code. Plugins may be added to the include/plugins folder.
/var/log/nginx
nginx will store it's access & error logs in this location. If you wish to expose these to automatic log collection tools then you should mount this volume.
INSTALL_SECRET
Secret string value for OST installation. A random value is generated on start-up and persisted within the container if this is not provided.
If using in production you should specify this so that re-creating the container does not cause your installation secret to be lost!
INSTALL_CONFIG
If you require a configuration file for OSTicket with custom content then you should create one and mount it in your container as a volume. The placeholders for the MySQL connection must be retained as these will be populated automatically when the container starts. Set this environmental variable to the fully qualified file name of your custom configuration. If not specified, the default OSTicket sample configuration file is used.
INSTALL_EMAIL
Helpdesk email account. This is placed in the configuration file as well as the DB during installation. Defaults to '***'
The remaining environmental variables can be used as a convenience to provide defaults during the automated database installation but most of these settings can be changed through the admin panel if required. These are only used when creating the initial database.
INSTALL_NAME
The name of the helpdesk to create if installing. Defaults to "My Helpdesk".
ADMIN_FIRSTNAME
First name of automatically created administrative user. Defaults to 'Admin'.
ADMIN_LASTNAME
Last name of automatically created administrative user. Defaults to 'User'.
ADMIN_EMAIL
Email address of automatically created administrative user. Defaults to '***'.
ADMIN_USERNAME
User name to use for automatically created administrative user. Defaults to 'ostadmin'.
ADMIN_PASSWORD
Password to use for automatically created administrative user. Defaults to 'Admin1'.
This image was put together relatively quickly and could probably be improved to meet other use cases.
Please feel free to open an issue if you have any changes you would like to see. All pull requests are also appreciated!
This image and source code is made available under the MIT licence. See the LICENSE file for details.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务