Replies: 2 comments
-
I am experimenting with using the pom file for that, instead of docker-compose. I was hoping to use the <configuration>
<containerNamePattern>%a</containerNamePattern>
<images>
<image>
<alias>pebble</alias>
<name>ghcr.io/letsencrypt/pebble:latest</name>
<run>
<cmd>
<exec>
<arg>pebble -strict -dnsserver ${docker.container.challtestsrv.ip}:8053 -config /test/config/pebble-config.json</arg>
</exec>
</cmd>
</run>
</image>
<image>
<alias>challtestsrv</alias>
<name>ghcr.io/letsencrypt/pebble-challtestsrv:latest</name>
<run>
<cmd>
<exec>
<arg>pebble-challtestsrv -defaultIPv6 "" -defaultIPv4 ${docker.container.challtestsrv.ip}</arg>
</exec>
</cmd>
</run>
</image>
</images>
</configuration> (Unrelated configuration bits are skipped.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found a workaround by getting the IP address from inside the container with a shell script. It won't win a beauty contest, but it's working. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For integration tests, I have to start two docker container, called "pebble" and "challtestsrv". The problem is that the services in both containers need to know the IP address of the "challtestsrv" container as command line parameter. This is an external requirement that I have no influence on.
A solution is to set up a bridge network, and use fixed IP addresses. This would be an example solution with docker-compose:
https://github.com/letsencrypt/pebble/blob/main/docker-compose.yml
(The file states
version: "3"
, but it should still work when downgraded toversion: "2"
.)However, it seems that docker-maven-plugin does not support the
networks:
section yet. When I try to run the docker-compose file, I get an error ('networks:' Aliases must be given as a map of strings. 'aliases' key not founded). The plugin documentation also says thatnetworks
is not supported yet.I don't really need a docker-compose file. It would be okay for me to start both containers in the pom.xml using a "classic" configuration approach.
However I have found no way to set up the bridge network with a subnet, and fixed ipv4_addresses for the containers.
I am running out of ideas. Can you give me a hint how to resolve that problem?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions