Docker platform variable expansion

Description

I like the relatively recently added feature to specify the docker platform when running an image. I would really like to use this with a parallel matrix to run a job for multiple arches. It looks like variable expansion is supported for the image:name field but not for the image:docker:platform field. I would like for variable expansion to be added here.

Proposal

As an example of what I'd like to do:

.base_job:
  image:
    name: ubuntu:24.04
    docker:
      # Is not presently supported
      platform: $PLATFORM

my_job:
  extends:
    - .base_job
  parallel:
    matrix:
      - PLATFORM: ["linux/amd64", "linux/arm64"]

I looked at the code and I think it might be as easy as adding executors/docker/docker.go:expandAndGetDockerImage to have:

dockerOptions.Platform := e.ExpandValue(dockerOptions.Platform)
if err != nil {
    return nil, err
}

before the call to GetDockerImage.

I would be okay looking into making the change as a PR, but I'm not really sure how to build/test this.

Links to related issues and merge requests / references