使用 drycc 路径
Drycc 容器注册表允许您将基于 Docker 的应用部署到 Drycc。支持通用运行时和私有空间。
2 分钟阅读
Drycc 堆栈仅适用于高级用例。除非您有自定义 Docker 镜像的具体需求,否则我们建议使用 Drycc 的默认 buildpack 驱动的构建系统。它提供自动基础镜像安全更新和特定于语言的优化。它还避免了维护容器 Dockerfile 的需要。
Drycc 配置路径概述
Drycc 仓库有两种不同的形式:
-
工作树根目录下的
.drycc
目录; -
根目录是一个"裸"仓库(即没有自己的工作树)。 通常用于
drycc pull
。
Drycc 仓库中可能存在这些东西。
config/[a-z0-9]+(\.[a-z0-9]+)*::
配置文件名,文件名是组名。
格式是环境变量格式。
[a-z0-9]+(\-[a-z0-9]+)*.(yaml|yml)::
流水线配置文件。
配置格式
Environment variables follow
配置格式
环境变量遵循
DEBUG=true
JVM_OPTIONS=-XX:+UseG1GC
流水线格式
清单有三个顶级部分。
- build – 指定要构建的 Dockerfile。
- env – 指定容器中的环境变量。
- run – 指定要执行的发布阶段任务。
- config – 指定配置组,全局组自动引用。
- deploy – 指定部署的命令和参数。
这是一个说明使用清单构建 Docker 镜像的示例。
kind: pipeline
ptype: web
build:
docker: Dockerfile
arg:
CODENAME: bookworm
env:
VERSION: 1.2.1
run:
command:
- ./deployment-tasks.sh
image: task
timeout: 100
config:
- jvm-config
deploy:
command:
- bash
- -ec
args:
- bundle exec puma -C config/puma.rb
有关更多部署信息,请参考 drycc 示例。
Pipeline format
A manifest has three top-level sections.
- build – Specifies the to build Dockerfile.
- env – Specifies environment variables in container.
- run – Specifies the release phase tasks to execute.
- config – Specifies config group, global group automatic reference.
- deploy – Specifies the commands and args to deploy.
Here’s an example that illustrates using a manifest to build Docker images.
kind: pipeline
ptype: web
build:
docker: Dockerfile
arg:
CODENAME: bookworm
env:
VERSION: 1.2.1
run:
command:
- ./deployment-tasks.sh
image: task
timeout: 100
config:
- jvm-config
deploy:
command:
- bash
- -ec
args:
- bundle exec puma -C config/puma.rb
For more deployment information, please refer to the drycc examples.
反馈
这个页面有帮助吗?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.