Hello,
I try to mount project dir for scaning using horusec sast utility:
horusec_sast:
stage: check-code
image: docker:19.03.12
script:
- export CONTAINER_ID=$(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID" -f "label=com.gitlab.gitlab-runner.type=build")
- docker run -v /var/run/docker.sock:/var/run/docker.sock --volumes-from ${CONTAINER_ID} -v $(pwd):/opt horuszup/horusec-cli:latest ls -la /opt
Job container has following mounts:
"Mounts": [
{
"Type": "bind",
"Source": "/var/run/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "runner-bgwxj1xm-project-298-concurrent-0-cache-3c3f060a0374fc8bc39395164f415a70",
"Source": "/var/lib/docker/volumes/runner-bgwxj1xm-project-298-concurrent-0-cache-3c3f060a0374fc8bc39395164f415a70/_data",
"Destination": "/cache",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
},
{
"Type": "volume",
"Name": "runner-bgwxj1xm-project-298-concurrent-0-e150afeb26875a27-cache-c33bcaa1fd2c77edfc3893b41966cea8",
"Source": "/var/lib/docker/volumes/runner-bgwxj1xm-project-298-concurrent-0-e150afeb26875a27-cache-c33bcaa1fd2c77edfc3893b41966cea8/_data",
"Destination": "/builds",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
}
]
Config of gitlab runner - config.toml: privileged = false, volumes = [“/var/run/docker.sock:/var/run/docker.sock”, “/cache”]
After completing the job, there are no project files in the /opt directory.
How to solve problem?
Please, help!