Open jmzaleski opened 7 years ago
My 2 cents: my read of things suggests that keeping EXPOSE
directive in the Dockerfile, even if it's made slightly redundant by the use of docker-compose
, is a good practice, because it provides documentation of which port(s) an image is capable of publishing and DRYs up use of container in other setups (ie., Docker Swarm / Docker Cloud).
My reading of the docker-compose literature suggests that the port command in tapp/docker-compose.yml is what actually makes this work.
More suspicious yet when I notice that cp/Dockerfile expose port 3000 also -- but then cp/docker-compose.yml says 5000:5000 and that's where we appear to wind up listening.