简体   繁体   中英

Kompose feature similar to docker-compose links

We are doing a POC using docker for integration tests. We have a container with the image of an api and another container with one mongodb.

The api container must access mongodb via db-mongo-dev-company.aws.local, so I put the following entry in docker-compose:

links: - "mongodb: db-mongo-dev-company.aws.local"

It works perfectly with "docker-compose up".

The problem is that kompose does not have support for the feature "links", according to the following link:

https://github.com/kubernetes/kompose/blob/master/docs/conversion.md

We can't find an alternative to make this link, do you have any idea?

To solve this situation, I simply changed the url in the properties of the api project.

Example: I Have a file named bootstrap.yaml in src/main/resources that is looking for the spring cloud. In the DockerFile, after i pull the image of the api, i replace the file by another bootstrap.yaml file with another properties, changing the url of the mongodb.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM