How to run an image with docker cli parameters in .gitlab-ci.yml

Hello everyone,

I am trying to run a custom image in my pipeline.

.gitlab-ci.yml file

stages:
  - running_test

tests_execution:
  stage: running_test
  image: custom-image:0.0.1
  cache:
    paths:
    - node_modules/
  script:
   - npm install --save
   - npm run migrations
   - npm install eslint --save-dev

Is there any way to run the image with some command, like in my case i want to run the docker image with this command

sudo docker run -it --privileged f421821c06b4 /bin/bash

Thank you in advance