Using Exec Reports with Containers

Chalk’s exec capability is particularly powerful when used with containers. Let’s look at a simple example:

Monitoring a Container

First, let’s build a container image with Chalk:

# Create a simple Dockerfile
$ cat > Dockerfile << EOF
FROM alpine
CMD ["sh", "-c", "while true; do echo 'Container is running...'; sleep 30; done"]
EOF

# Build the image with Chalk
$ chalk docker build -t chalk-demo-container .

Now, we can run the container:

docker run -d --name chalk-demo chalk-demo-container

If you have built the container with Chalk’s entrypoint wrapping enabled, it will automatically generate exec reports when the container starts. You can view these reports in your configured output locations.

To enable entrypoint wrapping, you would have loaded a configuration like:

$ chalk load https://chalkdust.io/wrap_entrypoints.c4m