Skip to content

Can't open react app in code-server while running on docker container. #5488

Answered by jsjoeio
Avirup-301294 asked this question in Q&A
Discussion options

You must be logged in to vote

Hmm....so outside a docker container, localhost works so localhost:3000 works, which we know.

Do you need an additional -p 127.0.0.1:3000:3000 in the run command? But then if you change the port, you'd have to kill the container not ideal.

I found this:

docker run -p 2000-5000:2000-5000 -v /host/:/host appimage

to expose a range of ports.

cc @code-asher in case you know other solutions

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@code-asher
Comment options

@code-asher
Comment options

@Avirup-301294
Comment options

Answer selected by jsjoeio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants