Идем в документацию
https://docs.docker.com/engine/reference/builder/ и читаем.
The EXPOSE instruction does not actually publish the port. It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. To actually publish the port when running the container, use the -p flag on docker run to publish and map one or more ports, or the -P flag to publish all exposed ports and map them to high-order ports.
я очень часто вижу, что в контейнерах вообще не используют EXPOSE , просто описывают в docker-compose какие порты как должны пробрасываться и так далее. Но когда-то считалось хорошим правилом описывать в Dockerfile с помощью EXPOSE что и как должно в контейнере торчать наружу. Не отменяя при этом необходимости сделать docker -p 80:80 ну или что там вам надо.