-
Notifications
You must be signed in to change notification settings - Fork 1
Where things are in docker
You will use different addresses to reach the same service depending on whether you are in the host system, or inside one of your containers. This information can be found in the docker-compose.yml
file. For example:
fcrepo:
image: nulib/fcrepo4:4.7.5
ports:
- "8984:8080"
creates a service called fcrepo based on a docker image that runs fedora on port 8080. Thus, from another container its address is http://fcrepo:8080/
. Since the 'ports' section maps it to port 8984, you can reach it from your host system at http://localhost:8984
. If you leave out the 'ports' section, the service would be inaccessible from outside docker.
The most useful service addresses here are:
Service | from host | from containers |
---|---|---|
hyrax | http://localhost:3000 | http://web:3000/ |
solr | http://localhost:8983/solr/#/ | http://solr:8983/solr/hyrax |
fedora | http://localhost:8984/rest | http://fcrepo:8080/rest |
test solr | http://localhost:8985/solr/#/ | http://solr_test:8983/solr/hyrax |
test fedora | http://localhost:8986/rest | http://fcrepo_test:8080/rest |
(I've shown URL for the solr web console from the host, but its API endpoint from the container, but either one could be reached in the other context)