cli icon indicating copy to clipboard operation
cli copied to clipboard

`seccomp=profile.json` path isn't relative to `devcontainer-feature.json` or `compose.yml`

Open snebjorn opened this issue 1 year ago • 7 comments

How is a path to a seccomp profile file specificed?

This doesn't work when seccomp.json is in same folder as devcontainer-feature.json

// devcontainer-feature.json
{
  "securityOpt": ["seccomp=seccomp.json"]
}

This doesn't work when seccomp.json is in same folder as compose.yml

// devcontainer.json
{
  "dockerComposeFile": "compose.yml",
  // rest omitted...
}
# compose.yml
services:
  app:
    security_opt:
      - seccomp:seccomp.json

seccomp accepts a path https://docs.docker.com/engine/security/seccomp/

$ docker run --rm \
             -it \
             --security-opt seccomp=/path/to/seccomp/profile.json \
             hello-world

snebjorn avatar Oct 08 '22 13:10 snebjorn