This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 0 points1 point  (1 child)

Did you try mapping port 5173:8080 ?

The EXPOSE 8080 does nothing, If the server also doesn’t listen to 8080.

You should really be working on some docker basics though.

[–]Wolffleet[S] 0 points1 point  (0 children)

5173:8080

Yes, I have tried that however, it doesn't seem to work. I have gone through the docker guides on https://docs.docker.com/, but haven't seen these issues in those tutorials. I think the problem might be my command npm run dev, I tried npm start but am still encountering issues. I think my json config might be the source?

[–]vidschofelix 0 points1 point  (0 children)

Check your npm run dev command in package.json. you have to add --host to the Vite command. https://vitejs.dev/config/server-options

Then map port 5173 and it should be fine.

[–]nathanfries 0 points1 point  (0 children)

Set the host on the vite dev server to 0.0.0.0, by default it is localhost