How do I use links when using the Docker provider for Molecule tests
platforms:
- name: client
image: ubuntu:focal
groups:
- robots
exposed_ports:
- 3022
published_ports:
- 0.0.0.0:3022:3022/tcp
networks:
- name: molecule_test
links:
- server
- name: server
image: ubuntu:focal
exposed_ports:
- 3080
- 443
- 3025
published_ports:
- 0.0.0.0:3025:3025/tcp
- 0.0.0.0:3080:3080/tcp
- 0.0.0.0:443:443/tcp
networks:
- name: molecule_test
links:
- p3-10000
groups:
- servers
From the client I want to be able to do something like
curl https://server:443/whatever
This doesn't work. I get a ConnectionError.
If I replace the "server" with the ip address of the server machine. Then everything works fine.
I looked in /etc/hosts thinking this would be similar to docker aliases but there is nothing there.