Mix shell and docker executor


here is what I’d like to accomplish:

build_image:   // done on host
    stage: build

test_image:  // done in my-image instance
    image: my-image
    stage: test

deploy_image:  // done on host
    stage: deploy

Basically, I’d like to mix the docker and shell executor. At least this is how I imagine my CI pipeline.
Any suggestions on how to do this ?

Thank you