Docker 和 Gitlab - 如何修改 docker 运行
Docker and Gitlab - how to modify the docker run
我对与 Docker 和 Gitlab 的有争议的集成还很陌生。
我在 .gitlab-ci.yml
中的脚本需要使用 ioncube 对文件进行编码,但由于 Docker 设置的一些安全限制,现在完全可以实现。因此,我需要修改 Gitlab 运行 在我为我的 Gitlab 项目开始工作时的 docker run
命令。
根据this page...
In addition, a change to the Docker security options on the container will be required to allow for the licensing process to function by using the –security-opt seccomp:unconfined option to the docker run command.
我需要将该额外参数添加到 docker run
调用中,但由于 Gitlab 在某处执行此操作,我不知道如何继续。
当我 运行 一份工作时,有没有办法让 Gitlab 包含 –security-opt seccomp:unconfined
?
编辑:我在自己的服务器上托管 Gitlab。
GitLab CI 进程通过 GitLab Runner 执行其管道 stages/builds。 (https://docs.gitlab.com/runner/).
GitLab Runner 已注册到 GitLab 实例或特定的 GitLab 项目。您在 gitlab-ci.yml 文件中指定的配置是由 Runner 执行的。在您的情况下,您指定 GitLab Runner 来执行 Docker 容器。
您可以使用 GitLab Runners 进行一些高级配置 (https://docs.gitlab.com/runner/configuration/advanced-configuration.html). The setting that you are looking for is in this section: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-docker-section。
在托管您的 GitLab Runner 的服务器上(或在托管您的 GitLab Runner 的 Docker 实例中)修改 config.toml 文件(可能位于 /etc/gitlab-runner/config.toml) .如果您已注册此 Runner 以执行 Docker 容器,您应该会看到 [runners.docker] 部分。您要在此部分中添加:
security_opt: ["seccomp:unconfined"]
我对与 Docker 和 Gitlab 的有争议的集成还很陌生。
我在 .gitlab-ci.yml
中的脚本需要使用 ioncube 对文件进行编码,但由于 Docker 设置的一些安全限制,现在完全可以实现。因此,我需要修改 Gitlab 运行 在我为我的 Gitlab 项目开始工作时的 docker run
命令。
根据this page...
In addition, a change to the Docker security options on the container will be required to allow for the licensing process to function by using the –security-opt seccomp:unconfined option to the docker run command.
我需要将该额外参数添加到 docker run
调用中,但由于 Gitlab 在某处执行此操作,我不知道如何继续。
当我 运行 一份工作时,有没有办法让 Gitlab 包含 –security-opt seccomp:unconfined
?
编辑:我在自己的服务器上托管 Gitlab。
GitLab CI 进程通过 GitLab Runner 执行其管道 stages/builds。 (https://docs.gitlab.com/runner/).
GitLab Runner 已注册到 GitLab 实例或特定的 GitLab 项目。您在 gitlab-ci.yml 文件中指定的配置是由 Runner 执行的。在您的情况下,您指定 GitLab Runner 来执行 Docker 容器。
您可以使用 GitLab Runners 进行一些高级配置 (https://docs.gitlab.com/runner/configuration/advanced-configuration.html). The setting that you are looking for is in this section: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-docker-section。
在托管您的 GitLab Runner 的服务器上(或在托管您的 GitLab Runner 的 Docker 实例中)修改 config.toml 文件(可能位于 /etc/gitlab-runner/config.toml) .如果您已注册此 Runner 以执行 Docker 容器,您应该会看到 [runners.docker] 部分。您要在此部分中添加:
security_opt: ["seccomp:unconfined"]