I have jenkins working inside a container and the github project source code.
I need to run the project in a container on the same host as jenkins, but not as docker-in-docker, I want to run them as twin containers.
My pipeline is as follows:
- pull the source from github
- create a project image
- run project container
What I'm doing right now is using the host docker socket from the jenkins container:
/var/run/docker.sock:/var/run/docker.sock
I have a problem when the jenkins container mounts the source volume from / var / jenkins _home / workspace / BRANCH_NAME into the project container:
volumes: - ./servers/identity/app:/srv/app
I get an empty folder "/ srv / app" in the project container
My best guess is that docker is trying to install it from the host, not from the jenkins container.
So the question is: how can I explicitly install the container from which I mount the volume?
docker continuous-integration jenkins
Zhorzh Alexandr
source share