I am executing a pipeline with all dependencies and integration tests. For integration tests I have written one shell script which runs docker image for postgres db and put execute the queries within it. In my .gitlab-ci.yml file when I put the stage of integration test and run the pipeline then when it executes the shell script then it says docker not found.
Whereas if I run docker info in any of the stage in .gitlab-ci.yml then it is executed properly…
The script has command -
docker run --rm --name pg_test -d -p 5100:5432 -e POSTGRES_USER=pg -e POSTGRES_PASSWORD=aaaaaa -e POSTGRES_DB=db_test postgres:9.6
Successfully started process ‘command ‘sh’’
./src/integration/scripts/testDBSetup.sh: line 1: docker: not found
The expectation is that the script should be executed properly and the docker should be available within it.
We are using self-managed git-lab.