Eri*_*ric 6 docker gitlab-ci-runner
我使用GitLab CI Runner,它使用命令:
docker run -d --name postgres postgres:9.4
Run Code Online (Sandbox Code Playgroud)
我想做这样的事情:
docker run -d --name postgres --volumes-from postgres_datastore postgres:9.4
Run Code Online (Sandbox Code Playgroud)
但GitLab CI Runner不支持任何选项(-v or --volumes-from).
还有其他方法吗?
volumes-fromGitlab CI Runner中尚未提供Docker 选项(请参阅此PR),但您可以配置主机安装和卷:
[runners.docker]
volumes = ["/host/path:/target/path:rw", "/some/path"]
Run Code Online (Sandbox Code Playgroud)
上面的示例将安装/host/path在/target/path/容器内部,并在其中创建一个新的卷容器/some/path.
有关所有与docker 相关的选项,请参阅Gitlab CI Runner 手册.
编辑:
对于服务容器,似乎您只能通过服务映像的dockerfile定义卷.也许足够取决于您的要求.
| 归档时间: |
|
| 查看次数: |
9647 次 |
| 最近记录: |