
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
cf-bosh-cli是一个集成多种CLI工具的Docker镜像,旨在通过容器化方式提供部署和管理Cloud Foundry及相关基础设施所需的各类命令行工具。容器暴露SSH端口,支持密码或RSA密钥认证。
apg - 自动密码生成器bosh - Bosh命令行工具([***])bosh-gen - Bosh发布包创建工具(https://github.com/cloudfoundry-community/bosh-gen)cf - Cloud Foundry命令行工具(https://github.com/cloudfoundry/cli)credhub - Credhub命令行工具(https://github.com/cloudfoundry-incubator/credhub-cli)fly - Concourse命令行工具(https://github.com/concourse/fly)git - Git命令行工具jq - JSON处理工具(https://stedolan.github.io/jq/)spruce - YAML模板工具,用于生成Bosh部署清单(https://github.com/geofffranks/spruce)terraform - Terraform命令行工具(https://www.terraform.io/)uaac - Cloud Foundry UAA命令行工具(https://github.com/cloudfoundry/cf-uaac)vendir - 定义并获取组件到目标目录的工具(https://github.com/vmware-tanzu/carvel-vendir/)yarn - 包管理器(https://yarnpkg.com/fr/)bbr - Bosh备份与恢复命令行工具(http://docs.cloudfoundry.org/bbr/)gof3r - S3 bucket的快速、并行化流访问客户端(https://github.com/rlmcpherson/s3gof3r)mc - Minio S3命令行工具(https://github.com/minio/mc)mongo - MongoDB shell命令行工具(https://docs.mongodb.com/manual/mongo/)mysqlsh - MySQL shell命令行工具(https://dev.mysql.com/doc/mysql-shell-excerpt/5.7/en/)redis - Redis命令行工具(https://redis.io/topics/rediscli/)shield - Shield命令行工具(https://docs.pivotal.io/partners/starkandwayne-shield/)helm - Kubernetes包管理器(https://docs.helm.sh/)kapp - Kubernetes YAML工具(https://github.com/k14s/kapp/)klbd - Kubernetes镜像构建编排工具(https://github.com/k14s/kbld/)kubectl - Kubernetes命令行工具(https://kubernetes.io/docs/reference/generated/kubectl/overview/)kustomize - Kubernetes YAML文件模板自定义工具(https://github.com/kubernetes-sigs/kustomize/)k9s - Kubernetes命令行工具(https://github.com/derailed/k9s)svcat - Kubernetes服务目录命令行工具(https://github.com/kubernetes-sigs/service-catalog/)ytt - YAML模板工具(https://github.com/k14s/ytt/)velero - Kubernetes集群资源备份/恢复命令行工具(https://github.com/vmware-tanzu/velero)从Docker Hub拉取镜像:
bashdocker pull docker.xuanyuan.run/orangecloudfoundry/orange-cf-bosh-cli:<image_tag>
克隆仓库:
bashgit clone https://github.com/orange-cloudfoundry/orange-cf-bosh-cli.git
构建镜像:
bashdocker build -t cf-bosh-cli:<image_tag> .
注意:
连接容器后,可通过shell界面的tools命令查看已安装的CLI工具和别名列表。
向容器提供公钥
启动镜像,注意将容器SSH端口(22)映射到主机端口:
bashdocker run --name bosh-cli -d -p 2222:22 -v /home/bosh -v /data -e "SSH_PUBLIC_KEY=<path_to_your_public_ssh-rsa_key>" docker.xuanyuan.run/orangecloudfoundry/orange-cf-bosh-cli
通过SSH登录容器:
bashssh -p 2222 -i <path_to_your_rsa_private_key> bosh@localhost
此时密码登录已完全禁用。默认情况下,容器重启或更新后,包含公钥的文件~/.ssh/authorized_keys会被覆盖。
另一种选择是通过"Docker Bosh Release"(https://github.com/cloudfoundry-community/docker-boshrelease)部署容器。
以下示例中:
Bosh部署清单示例:
yamldeployment_name = 'bosh-cli' static_ip = 'xx.xx.xx.xx' dns_servers = 'xx.xx.xx.xx' http_proxy = 'http://proxy:3128' https_proxy = 'http://proxy:3128' docker_image = 'orangecloudfoundry/orange-cf-bosh-cli' docker_tag = 'latest' --- name: <deployment_name> director_uuid: <director_uuid> releases: - name: docker version: latest compilation: workers: 1 network: default reuse_compilation_vms: true cloud_properties: cpu: 1 disk: 8096 ram: 2048 update: canaries: 0 canary_watch_time: 30000-1200000 update_watch_time: 30000-1200000 max_in_flight: 32 serial: false networks: - name: default type: manual subnets: - range: xx.xx.xx.xx/xx reserved: - xx.xx.xx.xx-xx.xx.xx.xx static: - <static_ip> gateway: xx.xx.xx.xx dns: [<dns_servers>] cloud_properties: name: NET resource_pools: - name: default stemcell: name: xxx version: latest network: default cloud_properties: ram: 512 disk: 4_096 cpu: 2 jobs: - name: bosh-cli templates: - name: docker - name: containers instances: 1 resource_pool: default persistent_disk: 102_400 networks: - name: default default: [dns, gateway] static_ips: - <static_ip> properties: containers: - name: data_container image: docker.xuanyuan.run/<docker_image>:<docker_tag> bind_volumes: - "/data" volumes: - "/etc/ssl/certs:/etc/ssl/certs:ro" - "/var/vcap/data/tmp/bosh-cli:/var/tmp/bosh-cli:ro" - name: user1_bosh_cli image: docker.xuanyuan.run/<docker_image>:<image_tag> hostname: user1_bosh_cli env_vars: - "SSH_PUBLIC_KEY=<your_ssh-rsa_public_key>" bind_ports: - "2222:22" volumes: - /home/bosh depends_on: - data_container volumes_from: - data_container - name: user2_bosh_cli image: docker.xuanyuan.run/<docker_image>:<image_tag> hostname: user2_bosh_cli env_vars: - "SSH_PUBLIC_KEY=<your_ssh-rsa_public_key>" bind_ports: - "2223:22" volumes: - /home/bosh depends_on: - data_container volumes_from: - data_container
通过SSH登录目标容器:
bashssh -i <path_to_your_rsa_private_key> -p 2222 bosh@docker.bosh.release.deployment
(将docker.bosh.release.deployment替换为使用Bosh Release部署的Docker主机的IP或DNS名称)
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务