Using pure Docker I can use --network
cli argument to make it possible for container to access something running either on 0.0.0.0 of Docker host or on some other named network within the same docker engine.
Can Earthly targets access services running on Docker host or running in other containers within named networks on the same docker engine?
The reason why I am asking is because I would like to use Maven repository manager (i.e. Apache Archiva or Reposilite) for resolving dependencies during Earthly-based build.
The problem is that typical Spring-Boot-based enterprise Java app usually have a large dependencies graph and whenever I change something in build files, the cache of the Earthly target responsible for dependencies resolution becomes invalidated and all of the dependencies need to be resolved over the internet/network again, which takes some time.
Using such caching proxy (Maven repository manager) should replace downloading all the dependencies over the network with copying them over the network stack from the same machine.
I can host such caching proxy for dependencies:
- either directly on docker host
- or in a Docker container (with corresponding port exposed) running on the same Docker host which Earthly also uses
How Earthly target can access such service?