Closed youngseoka closed 7 months ago
ports
and expose
are separate sections in docker-compose, and though they work similarly (both make ports available to other services outside the container but connected to the same network), but expose
doesn't publish the port to the host (they are only available to linked services). In short, this configuration binds 8555
to the host's 8555
and exposes 8556
to linked services (but not to the host).
Does that make more sense?
I'm going to close this for now; if you find you have more questions or need additional clarification, please feel free to comment and we can reopen if that makes sense!
docker-compose-atomizer.yml
in this file
watchtower0: build: context: . target: atomizer image: opencbdc-tx-atomizer tty: true command: ./build/src/uhs/atomizer/watchtower/watchtowerd atomizer-compose.cfg 0 ports:
why port is 8555:8555 but expose 8556?
is this right?