Set default arguments for `gitlab-runner exec docker`?

I’m using gitlab-ci-multi-runner (gitlab-runner) locally to test CI jobs before committing them a repo to run on the actual runners. gitlab-runner exec docker lets me run builds locally using the docker executor. But, I have to provide the arguments to the executor over and over again like so.

gitlab-runner exec docker --docker-volumes "/var/run/docker.sock:/var/run/docker.sock" --docker-privileged

Can I set arguments like --docker-volumes and --docker-privileged as a default somewhere? I tried copying the config.toml from the runners to ~/.gitlab-runner/config.toml, but it doesn’t seem to affect local execs.

1 Like

Have you tried setting privileged = true in your config.toml file?
More information about detailed configuration here