Hi,
I just downloaded 1.27.0, put binaries (linux) in /usr/bin/ and tried this command and receiving an error:
--> docker-slim build hello_golang
docker-slim[build]: info=http.probe message='using default probe'
docker-slim[build]: state=started
docker-slim[build]: info=params target=hello_golang continue.mode=probe rt.as.user=true keep.perms=true
docker-slim[build]: state=image.inspection.start
time="2020-03-01T19:06:25+01:00" level=fatal msg="docker-slim: failure" error="open /tmp/docker-slim-state/docker-slim-sensor: no such file or directory" stack="goroutine 1 [running]:\nruntime/debug.Stack(0x415436, 0x7f65e1e39b00, 0x100)\n\truntime/debug/stack.go:24 +0x9d\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn(0xb5b4a0, 0xc00001f050)\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:14 +0x54\ngithub.com/docker-slim/docker-slim/pkg/util/fsutil.PrepareImageStateDirs(0x0, 0x0, 0xc0000d0050, 0x47, 0x1, 0x2, 0x2, 0x31, 0x0, 0x0, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/util/fsutil/fsutil.go:730 +0x9df\ngithub.com/docker-slim/docker-slim/internal/app/master/commands.OnBuild(0x9bd501, 0xa74064, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0000a0000, 0xc0000b9050, ...)\n\tgithub.com/docker-slim/docker-slim/internal/app/master/commands/build.go:199 +0xa83\ngithub.com/docker-slim/docker-slim/internal/app/master.init.0.func6(0xc0000c2160, 0x0, 0xc0000c82f0)\n\tgithub.com/docker-slim/docker-slim/internal/app/master/cli.go:862 +0x1936\ngithub.com/urfave/cli.HandleAction(0x99d1a0, 0xa99000, 0xc0000c2160, 0xc0000c2160, 0x0)\n\tgithub.com/urfave/cli@v1.22.1/app.go:523 +0x11a\ngithub.com/urfave/cli.Command.Run(0xa6ad11, 0x5, 0x0, 0x0, 0xc0001ec560, 0x1, 0x1, 0xa8d5c0, 0x3e, 0x0, ...)\n\tgithub.com/urfave/cli@v1.22.1/command.go:174 +0x56e\ngithub.com/urfave/cli.(*App).Run(0xc000210000, 0xc000106150, 0x3, 0x3, 0x0, 0x0)\n\tgithub.com/urfave/cli@v1.22.1/app.go:276 +0x7ae\ngithub.com/docker-slim/docker-slim/internal/app/master.runCli()\n\tgithub.com/docker-slim/docker-slim/internal/app/master/cli.go:1274 +0x55\ngithub.com/docker-slim/docker-slim/internal/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/internal/app/master/app.go:6 +0x25\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:8 +0x20\n" version="linux|Transformer|1.27.0|bbc8c5364169f10f69a87dc09968b1b719c4e2bd|2020-02-29_06:51:21AM"
Any suggestions, please?
docker-slim build --http-probe=false --include-path=/usr/local/bin/docker-php-source php:7.3-alpine
--exclude-pattern
build
command parameters
--exclude-pattern
flag supports the Glob/Match syntax ( https://golang.org/pkg/path/filepath/#Match ) in Go plus the ** pattern
s6-mkfifo: fatal: unable to mkfifo /var/run/s6/services/s6-fdholderd/supervise/control: No such file or directory
Hi guys, is there any guidance on how to figure out base image and add that to xray?
@yashbhutwala great to see that you looked at the code :-) there’s actually quite a bit of information related to the base image information when you run the xray command. For example, here’s what I got running docker-slim xray dslimexamples/server-node-hapi-alpine
(server-node-haps-alpine is one of the sample app, so you can try it yourself):
Dockerfile for the image starts with: FROM node:6.11.0-alpine
The console output from the xray command has this line:
docker-slim[xray]: info=image.stack index=0 name='node:6.11.0-alpine' id='sha256:b7535c8c7bee13ca6c082141f5416f2f5d9b8bf68a61cb9e6ce82d42773aa40d' instructions=8 message='see report file for details’
Note how the name
field value is node:6.11.0-alpine
, which matches the FROM instruction value.
The slim.report.json file (that gets generated when the command is done) includes node:6.11.0-alpine
, node
and 6.11.0-alpine
in one of the image_stack
sections.
And the auto-generated Dockerfile.fat file has line: # end of image: node:6.11.0-alpine (id: tags: node:6.11.0-alpine)
level=fatal msg="docker-slim: failure" error="source is not a regular file"
--include-path
works with directories too, so no need to include each file individually
./docker-slim build --http-probe fogf.18.04.tar:latest
)