My position. Attempts to run docker structure in one box several times. This is my docker-compose.yml :
version: '3' services: code: image: organization:java-maven links: - mysql:mysql volumes: - "${PWD}:/home/ubuntu/src" mysql: image: organization:mysql
Doing this twice with docker-compose run code mvn clean test creates two code containers and one mysql container.
Now I want one code be associated with one mysql and another code associated with another mysql .
How to do it? It is assumed that it runs on subordinate jenkins, and maven executions cannot use mysql.
I tried unsuccessfully with the "-e KEY = VALUE" option for docker-compose run along with container_name in the docker-compose run file.
Not sure how to approach this, please help, thanks.
docker docker-compose
Wrench
source share