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:
deploy_to_dev:
stage: deploy
image: php:5.6
allow_failure: true
tags:
- arc
variables:
PWS_IP: 'X.X.X.X'
before_script:
- sudo apt-get update && sudo apt-get install -y libxml2-dev git
- docker-php-ext-install soap
script:
- git config --global http.sslVerify false
- git diff --name-only origin/DEV | xargs php ./scripts/pws_loadgroovy.php
only:
refs:
- DEV
variables:
- $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?