Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kyle Quest
    @kcq
    @nbenaglia looks like the main docker-slim process can't find the sensor executable in the /tmp/docker-slim-state/ directory where it was supposed to copy it (because you put the binaries in the /usr/bin directory)
    there's a couple of options... one option is to put the binaries in a different non-system bin directory where the main docker-slim app will be able to save its state
    another option is to use the global --state-path parameter (e.g., docker-slim --state-path /some/path/where/ds/will/be/allowed/to/write build your_target_image_name )
    Kyle Quest
    @kcq
    either way, it'll also try to repro it to see if it can be addressed without these workarounds
    Nicola Benaglia
    @nbenaglia

    another option is to use the global --state-path parameter (e.g., docker-slim --state-path /some/path/where/ds/will/be/allowed/to/write build your_target_image_name )

    Hi, thx for your answer, with state-path parameter I got it working.

    Kyle Quest
    @kcq
    @nbenaglia next release will include the official fix for it too
    iliefa
    @iliefa
    Hello guys. congrats for the project .it's really cool. i've reduced my imagesize from 200 MB to 36.9 MB. is there any way to integrate docker-slim into the gitlab-ci, so it does not use the docker daemon? Until now i have experimented with gitlab+ kaniko running on kubernetes runners.Thanks.
    Eele
    @eele94
    Hello does anyone know a alternative for Windows?
    Kyle Quest
    @kcq
    @iliefa It is possible to use it in Gitlab CI thought it does rely on Docker… Here’s a sample GitlabCI config file: https://gitlab.com/k.q/sandbox/-/blob/master/.gitlab-ci.yml
    Dockerless is an interesting option to consider… I have looked at a number of container build tools like Kaniko… Definitely something that will happen in the future
    Kyle Quest
    @kcq
    @eele94 are you looking for a way to run it on Windows (with WSL2, for example) or are you looking for something that would work with the actual Windows containers?
    M Luy
    @mayanneluyun_gitlab
    in relation to @iliefa, I'm also using Kaniko in our GitLab CI and I am finding ways how to use docker-slim and kaniko. Hope both can be integrated soon! All the best!
    Kyle Quest
    @kcq
    @mayanneluyun_gitlab interesting… is it an open source project? curious to see your setup with kaniko
    iliefa
    @iliefa
    @kcq hello. i want to exclude some files from a specific folder. how can i achieve this? i've tried with the includefiles option but not working. for example ,from php:7.3-alpine image, i want to exclude the files php-cgi, php-config from the /usr/local/bin
    iliefa
    @iliefa
    docker-slim build --include-path-file=/usr/local/bin/docker-php-source php:7.3-alpine --http-probe=false
    docker-slim[build]: could not read include path file (ignoring): stat /usr/local/bin/docker-php-source: no such file or directory
    even if the file exists in the image
    Kyle Quest
    @kcq
    @iliefa the —include-path-file parameter is a way to specify multiple include paths loaded from a local file…
    @iliefa your example should looks like this instead: docker-slim build --http-probe=false --include-path=/usr/local/bin/docker-php-source php:7.3-alpine
    @iliefa if you want to exclude a file or a set of files you should use the --exclude-pattern build command parameters
    Kyle Quest
    @kcq
    the --exclude-pattern flag supports the Glob/Match syntax ( https://golang.org/pkg/path/filepath/#Match ) in Go plus the ** pattern
    Andrew Skelton
    @AndrewSkelton
    Hi, currently trying to narrow down the cause of this error:
    s6-mkfifo: fatal: unable to mkfifo /var/run/s6/services/s6-fdholderd/supervise/control: No such file or directory
    Reproducible example on this issue, any suggestions or insight welcome! - docker-slim/docker-slim#161
    Kyle Quest
    @kcq
    thanks for sharing the repro @AndrewSkelton ! let me check the docker image to see where it’s coming from
    Yash
    @yashbhutwala
    Hi guys, is there any guidance on how to figure out base image and add that to xray?
    Carmelo Sammarco
    @carmelosammarco
    Hello everybody. I am trying to docker-slim one my image created. when i do it and run the container i receive the following error: standard_init_linux.go:211: exec user process caused "no such file or directory"... i run the image like that: "docker run -d -v "/${PWD}/Notebook:/SRC/Notebook" --name "container" -p 8888:8888 --restart always --shm-size 2g user/container.slim" and it works for the not slimmed one. Thank you in advance for your help
    1 reply
    Carmelo Sammarco
    @carmelosammarco
    I forget to say that the command used to create the slim image is : "docker-slim build --http-probe user/container" I need to add more or modify it in some way?
    Kyle Quest
    @kcq

    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)

    Daniel Leite
    @revolutionsystem
    Hello.
    I'm running the docker-slim on a hundred, seven, java 8 and wildfly image.
    However, it erases everything inside the image.
    What am I doing wrong in executing the command?
    Daniel Leite
    @revolutionsystem
    Centos 7
    Kyle Quest
    @kcq
    @revolutionsystem are those base images or are they application images with your applications running in them?