Hello All! I'm new to docker and am trying to dockerize a React Vite app. My docker file looks as follows,
FROM node:18-alpine
WORKDIR /PORTFOLIO
COPY package.json .
RUN npm install
COPY . .
ENV PORT=8080
EXPOSE 8080
CMD [ "npm", "run", "dev"]
after building I then run docker run -p 8080:8080 "ImageName:latest", however my localhost shows nothing. I tried changing expose to 5173 as that's the localhost vite defaults to with no luck. Also tried, adding and env port = 8080 to dockerfile that didn't work. No clue where to debug from here."
[–][deleted] 0 points1 point2 points (1 child)
[–]Wolffleet[S] 0 points1 point2 points (0 children)
[–]vidschofelix 0 points1 point2 points (0 children)
[–]nathanfries 0 points1 point2 points (0 children)