Skip to content

seccomp security opt cannot accept file path

Summary

Steps to reproduce

create a docker runner, set security-opt to ['seccomp=/path/to/seccomp.json'], then the runner cannot start up.

Actual behavior

seccomp only accept unconfined or a inline json string.

Expected behavior

should worked as docker cli, a path to a seccomp profile json file should be loaded.

Relevant logs and/or screenshots

job log
prepare environment: Error response from daemon: linux seccomp: Decoding seccomp profile failed: invalid character '/' looking for beginning of value (docker.go:817:0s).```
</details>

## Environment description

<!--
Are you using shared Runners on GitLab.com? Or is it a custom installation?
Which executors are used? Please also provide the versions of related tools
like `docker info` if you are using the Docker executor.
-->

<!--
Please add the contents of `config.toml` inside of the code blocks (```)
below, remember to remove any secret tokens!
-->
<details>
<summary> config.toml contents </summary>

```toml
Add your configuration here

Used GitLab Runner version

13.5.0

Possible fixes

similar to this patch