我正在尝试访问localhost:8100,这是我的离子应用程序,它在docker容器中运行,但无法打开。 这是我的dockerfile:
FROM node:10.16.3
WORKDIR /usr/src/ionic-app
COPY ./ /usr/src/ionic-app
RUN npm install -g cordova ionic
RUN npm install
这是我的Docker-compose文件 版本:“ 3.6”
服务:
#Backend API
backend-api:
container_name: backend
build:
context: ./api/
working_dir: /usr/src/smart-brain-api
command: npm run debug
ports:
- "3000:3000"
environment:
REDIS_HOST: redis
MONGOOSE_URI: 'mongodb://mongo:27017/appcomdill'
links:
- mongo
- redis
#MongoDB
mongo:
container_name: mongo
image: mongo
environment:
MONGOOSE_URI: 'mongodb://mongo:27017/appcomdill'
ports:
- "27017:27017"
#Redis
redis:
container_name: redis
environment:
REDIS_HOST: redis
image: redis
ports:
- "6379:6379"
#Ionic Front-end
ionic:
container_name: front-end
build:
context: ./ionic
working_dir: /usr/src/ionic-app
command: ionic serve
ports:
- "8100:8100"
每次我尝试连接到http://localhost:8100/时,都会不断显示“本地主机未发送任何数据”