Hi everyone,
I am using Dagger to create a couple of Docker images in a Jenkins pipeline. My code is structured as follows:
- BuildEnv method: This method creates the Docker image using
From,WithExec, andWithDefaultTerminalCmd. - Publish method: This method publishes the container returned by the
BuildEnvmethod.
The container I'm building in the BuildEnv method has an entrypoint that I previously set in the Dockerfile using the CMD directive. I assumed that WithDefaultTerminalCmd in Dagger would function the same as CMD, but it doesn't seem to work as expected. When I run the container, it immediately exits without executing the entrypoint, which is a simple shell script