Set up docker file for vite app and run vite app from docker container #62
surajgaire14
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Set up docker for vite based app
Create a dockerfile in the frontend folder.
Dockerfile contents:
Build the docker image
docker build -t ming-frontend .Run the container
docker run -p 5173:5173 ming-frontendIf the Site is still inaccessible then set the server to listen on public address in vite config file
First stop the container, delete the container and again rebuild the container
See the list of docker process status
docker ps -aThen stop the container
docker stop containerIdBuild the docker container
docker built -t ming-frontend .Run the docker container
docker run -p 5173:5173 ming-frontendNow we can access frontend in localhost:5173
Beta Was this translation helpful? Give feedback.
All reactions