# Monitor Docker container jobs with HookPulse

The container sends its exit status to HookPulse when the job ends. Pass the check-in URL as an environment variable.

HookPulse · Updated 2026-10-14

## Step 1. Create the monitor

Add a routine named container-backup and set how often the job runs. Its page shows the check-in URL: use it in place of https://hookpulse.net/in/YOUR_ID.

## Step 2. End the container command with the check-in

The image needs curl. $? is the exit status of the job.

```
FROM alpine:3.20
RUN apk add --no-cache curl
COPY backup.sh /usr/local/bin/backup.sh
CMD ["/bin/sh", "-c", "backup.sh; curl -fsS -m 10 --retry 3 \"$HOOKPULSE_URL/$?\""]
```

## Step 3. Run the container with the URL

Run it from cron, a scheduler or your orchestrator.

```sh
docker run --rm -e HOOKPULSE_URL="https://hookpulse.net/in/YOUR_ID" my-backup
```

## Step 4. Run it once

Run the container once. The routine shows the first check-in. From then on, a missed or failed run sends the alert.

[Create the monitor](https://hookpulse.net/?routine=container-backup&every=86400#routines)

[Monitor Docker container jobs with HookPulse](https://hookpulse.net/guides/docker)
