jem*_*emz 2 docker vue.js dockerfile docker-container
您好,我已经安装了新的应用程序 vue3 typescript + vite ,这是我在构建图像并旋转容器后遇到的问题。我无法访问 localhost:3000,浏览器只会显示
连接被重置
docker run --rm -it -v %cd%/:/app/src -p 3000:3000 myvitets
Run Code Online (Sandbox Code Playgroud)
Dockerfile
FROM node:14-buster-slim
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
EXPOSE 3000
CMD [ "npm", "run", "dev"]
Run Code Online (Sandbox Code Playgroud)
我还添加了 .dockerignore
node_modules/
.git
.gitignore
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我如何将我的应用程序运行到容器中吗?
先感谢您。