Closed lemos1235 closed 5 years ago
感谢, docker我就简单看过, 玩的不熟, 有空我研究下哈
docker-compose.yaml
version: '3.2'
services:
fiora:
build: .
restart: always
ports:
- "9200:9200"
environment:
- "DATABASE=mongodb"
mongodb:
image: mongo
restart: always
将 Dockerfile 与 docker-compose.yaml 添加到项目根目录,执行下面的命令用于快速构建并启动项目
docker-compose up -d
Hello @yinxin630 @lemos1235 and thank you. So long story short, i have cloned fiora locally and i want to dockerize the application in an image or two ( one for client interface and one for server). Would you please share the Dockerfiles configuration in order to build the image? i tried several times but it doesn't work Thanks alot.
Why my container can't connect mongo database(localhost:27017) ?
docker run --name mongo mongo
docker run --net=host --name fiora suisuijiang/fiora
@yinxin630 What i want to do is create a custom database image from mongo and node and not using the docker hub image. I've noticed that the client run from /build/dev-server.js and the server run from /server/main.js that's why i want to create two images out of those and then link them with docker-compose but i'm having trouble creating an image FROM two environments.
已支持 docker 自动构建
@yinxin630 Thanks alot.
建议:弄一下 docker 自动构建:-> link 省略掉 build 的时间
Dockerfile
或者