Skip to content

Docker always expose port 3000 #1904

Answered by colearendt
swuecho asked this question in Q&A
Discussion options

You must be logged in to vote

How are you running your containers? Why not build your pgrest_2 image using port 3000 too, and then port-map when you run the container? This is the usual pattern I have seen. Gets around the port collision neatly while allowing your containers to be built consistently 😄

docker run -it --rm -p 3001:3000 --name pgrest_2 postgrest/postgrest

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@swuecho
Comment options

Answer selected by steve-chavez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1902 on August 09, 2021 03:21.