Closed alifiroozi80 closed 1 year ago
me too
OK, I did find a temporary solution for now:
Keep the httpProbe
enabled, and add an option to the command that doesn't fail after the httpProbe
check. (--http-probe-exit-on-failure=false
)
Also, by default it will retry 5
times, so, it is a good idea to set it to 1
(Can't set it to 0
unfortunately) (--http-probe-retry-count=1
)
Here is the command:
docker-slim --report=off build --target 2b7ca628da40 --tag python:test1 --show-blogs --http-probe-retry-count=1 --http-probe-exit-on-failure=false
@alifiroozi80 you should try the --continue-after
parameter. Your original command disabled http probing and the app defaulted to the interactive mode instead. You can explicitly pick the continue mode that works better in CI environments. The README has a number of references about that parameter, but here's a high level overview to give you an idea:
You can pick one of these 'continue' modes:
enter
- the main app waits until you press enter to finish executing (not great for CI environments)signal
- the main app waits until you send a signal to it (can be used in CI environments)probe
- with this mode the main app waits for the http probes to execute before it continuesexec
- with this mode the main app waits for the exec param commands to execute<timeout-number-in-seconds>
- this is one of the modes you should try where you specify the number of seconds you want the main app to wait for the runtime inspection to execute and then the main app continues on its own without any interactionscontainer.probe
- this is relevant when you are using the compose mode where one of the containers in your compose setup is a test container that you'd want to run against your app containerThank you so much, @kcq.
This is the solution.
I added the --continue-after=10
to my command, and now everything is perfect.
Here is the complete command:
docker-slim --report=off build --target 2b7ca628da40 --tag python:test1 --show-blogs --http-probe=false --continue-after=10
thanks for your help @kcq
Expected Behavior
Hello I'm new to
slim
and want to use it in my CICD pipeline.When I try to resize a python image, it stops and shows me this message:
And after I press Enter, it will build the container successfully.
The problem is I'm not going to be there when the pipeline executes the command to press Enter! is there any flag or option to automate this?
The command:
Specifications
1.39.1
Ubuntu 20.04