slim: Error oci runtime error: exec: "/opt/dockerslim/bin/sensor": permission denied

Hi! I downloaded latest dist for mac v1.17, cloned samples from docker-slim/docker-slim/tree/master/sample/apps/node and built image from Dockerfile docker build -t my/sample-node-app . When i tried run ./docker-slim build --http-probe my/sample-node-app and got error:

MacBook-Pro:dist_mac alex$ ./docker-slim build --http-probe my/sample-node-app
docker-slim: [build] image=my/sample-node-app http-probe=true remove-file-artifacts=false image-overrides=map[] entrypoint=[] (false) cmd=[] (false) workdir='' env=[] expose=map[]
INFO[0000] docker-slim: inspecting 'fat' image metadata...
INFO[0000] docker-slim: [sha256:4c29409bc9585b228986bf1fa544153254b4e4ad76c36fdd46f2a8557cd8aed8] 'fat' image size => 419509897 (420 MB)

INFO[0000] docker-slim: processing 'fat' image info...
INFO[0000] docker-slim: starting instrumented 'fat' container...
INFO[0000] docker-slim: created container => 0880f964950ba839968bc42940eda55d40070a6719e6b8540b350ae642adf53a
FATA[0000] docker-slim: failure                          error=API error (500): {"message":"oci runtime error: exec: \"/opt/dockerslim/bin/sensor\": permission denied"}
 stack=goroutine 1 [running]:
runtime/debug.Stack(0xa2f57, 0xc4200188a8, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
github.com/docker-slim/docker-slim/utils.FailOn(0x582f00, 0xc42023ee60)
	/GITHUB/docker-slim-org/docker-slim/_vendor/src/github.com/docker-slim/docker-slim/utils/errors.go:11 +0x51
github.com/docker-slim/docker-slim/master/commands.OnBuild(0x0, 0x0, 0x0, 0xc420017c20, 0x7fff5fbff721, 0x12, 0x0, 0x0, 0xc420017b01, 0x5c27d8, ...)
	/GITHUB/docker-slim-org/docker-slim/_vendor/src/github.com/docker-slim/docker-slim/master/commands/build.go:76 +0x969
main.init.1.func4(0xc42009a8c0, 0x0, 0x0)
	/GITHUB/docker-slim-org/docker-slim/apps/docker-slim/cli.go:321 +0x713
reflect.Value.call(0x36e4a0, 0x41b388, 0x13, 0x3e96a9, 0x4, 0xc420125920, 0x1, 0x1, 0xaa218, 0x3dd0a0, ...)
	/usr/local/go/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0x36e4a0, 0x41b388, 0x13, 0xc420125920, 0x1, 0x1, 0x0, 0xc4200e3910, 0xb3526)
	/usr/local/go/src/reflect/value.go:302 +0xa4
github.com/codegangsta/cli.HandleAction(0x36e4a0, 0x41b388, 0xc42009a8c0, 0x0, 0x0)
	/GITHUB/docker-slim-org/docker-slim/_vendor/src/github.com/codegangsta/cli/app.go:487 +0x1e0
github.com/codegangsta/cli.Command.Run(0x3e9bc7, 0x5, 0x0, 0x0, 0xc420015ca0, 0x1, 0x1, 0x3fbdb7, 0x3e, 0x0, ...)
	/GITHUB/docker-slim-org/docker-slim/_vendor/src/github.com/codegangsta/cli/command.go:191 +0xc3b
github.com/codegangsta/cli.(*App).Run(0xc4200f2000, 0xc42000c280, 0x4, 0x4, 0x0, 0x0)
	/GITHUB/docker-slim-org/docker-slim/_vendor/src/github.com/codegangsta/cli/app.go:240 +0x611
main.runCli()
	/GITHUB/docker-slim-org/docker-slim/apps/docker-slim/cli.go:526 +0x55
main.main()
	/GITHUB/docker-slim-org/docker-slim/apps/docker-slim/main.go:5 +0x19

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 5
  • Comments: 27 (14 by maintainers)

Most upvoted comments

@khassel the initial setup worked because Gitlab uses a special /builds directory, which it mounts to all containers, so everything that ends up in it or its subdirectories will be mountable. For your own image with docker-slim you’ll need to make sure it’s installed to /builds/docker-slim or something like this. This Gitlab ticket is a nice reference about the ‘problem’: https://gitlab.com/gitlab-org/gitlab-ce/issues/41227

There’s a couple of enhancements planned for 1.25.1 where one of them will use a different way to transfer artifacts to and from the target container without using mounted volumes, so it’s no longer a problem for these types of environments.

By the way, I recently created a gitter channel ( https://gitter.im/docker-slim/community ), which might be easier to use for more interactive discussions 😃 Speaking of the more interactive discussions… would you be open to chatting on Skype, Google Hangout, WhatsApp, Telegram or some other private communication forum? I’d love to get your feedback about the planned CI/CD enhancements and the capabilities you wish were there.

That’s super helpful! Thank you! I’ll try to repro the condition to see how it can be addressed.