How to check which image was used in a GitLab runner when a command fails?

I have a multistage CI/CD setup which uses the default image (the runner is hosted on my server).

I need one stage to use a specific image (a MQTT client to send a single MQTT message but it does not really matter):

# .gitlab-ci.yml

  - backend
  - frontend
  - reload

# backends deployment

  stage: backend
    - docker build -t dash-googlecalendar -f backends/googlecalendar/Dockerfile backends

(... there are other builds at the backend stage here ...)

# frontend deployment

  stage: frontend
    - docker build -t dash-frontend -f frontend/Dockerfile frontend
# MQTT message

  stage: reload
  image: efrecon/mqtt-client
    - pub -h mqtt.mydomain -t dash/reload -m "`date`"

Everything runs smoothly until the reload stage:

Running with gitlab-runner 12.2.0 (a987417a)
  on srv zN2MsS9q
Using Shell executor...
Running on srv...
Fetching changes...
Reinitialized existing Git repository in /home/gitlab-runner/builds/zN2MsS9q/0/wsw70-docker/dash/.git/
Checking out 7d19cb65 as master...
Skipping Git submodules setup
$ pub -h mqtt.mudomain -t dash/reload -m "`date`"
bash: line 82: pub: command not found
ERROR: Job failed: exit status 1

pub is not recognized as a command in this image. But it does exist there, since the following command is successful:

docker run --init -it --rm efrecon/mqtt-client pub -h mqtt.mydomain -t dash/reload -m "`date`"

It is also successful if I start a bash and run pub from there, or if I use the full path to pub.

All this leads me to wondering whether the image efrecon/mqtt-client is actually used in that stage. How could I check that?

Bonus question: if the image is correctly used, what could have gone wrong with the pub command?