I'm trying to run my vite+react app using the docker container, the code is running fine but unfortunately, it's not opening in localhost 3000
DockerFile
FROM node:18-alpine
EXPOSE 3000
WORKDIR /react-vite-app
COPY package.json .
RUN yarn install
COPY . .
CMD [ "yarn","build"]
docker-compose.yml
version: "3.8"
services:
reactapp:
build: ./dir
container_name: react_vite_app
ports:
- '3000:3000'
Is something missing, If something is wrong please help me to fix this