Gitlab CI seems not to be deploying commands within container

I am running a gitlab ci script. It is to summon php:5.6 and run the commands within the php:5.6 container, but I have a feeling that gitlab is bashing this out in the Ubuntu shell of the gitlab-runner instead of the container.

This is the Gitlab CI:

  stage: deploy
  image: php:5.6
  allow_failure: true
  - arc
    PWS_IP: 'X.X.X.X'
  - sudo apt-get update && sudo apt-get install -y libxml2-dev git
  - docker-php-ext-install soap
  - git config --global http.sslVerify false
  - git diff --name-only origin/DEV | xargs php ./scripts/pws_loadgroovy.php
   - DEV
   - $CI_PROJECT_ID == "71"

however the CI is failing at the docker-php-ext-install soap command with a command not found error. I know that the command ‘must’ be executed from within the php container image or it will not work.

When I perform sudo docker run --rm -it php:5.6 bash and issue the same command from within the docker bash, the command is successful which leads me to believe the issue is, the CI pipeline is not properly engaging the command into the container. Is there anything wrong with my CI that may prohibit docker from executing the command properly?

Just wanted to see if anyone might have any suggestions.