用docker-compose启动容器时报了这个错。
不知道是什么原因
环境信息:
- Docker version 17.11.0-ce-rc4
- docker-compose version 1.18.0-rc2
dcokerfile 和docker-compose.yml如下
FROM alpine
RUN apk --update add curl && \
curl -L http://sourceforge.net/projects/leanote-bin/files/2.6/leanote-linux-amd64-v2.6.bin.tar.gz/download >> \
/usr/local/leanote-linux-amd64.bin.tar.gz && \
apk del --purge curl && \
rm -rf /var/cache/apk/*
RUN tar -xzf /usr/local/leanote-linux-amd64.bin.tar.gz -C /usr/local
RUN chmod +x /usr/local/leanote/bin/run.sh
RUN hash=$(< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-64};echo;); \
sed -i "s/app.secret=.*$/app.secret=$hash #/" /usr/local/leanote/conf/app.conf; \
sed -i "s/db.host=.*$/db.host=db/" /usr/local/leanote/conf/app.conf; \
sed -i "s/site.url=.*$/site.url=\${SITE_URL} /" /usr/local/leanote/conf/app.conf;
EXPOSE 9000
WORKDIR /usr/local/leanote/bin
ENTRYPOINT ["sh", "run.sh"]
version: '2'
services:
db:
restart: always
image: mongo
volumes:
- leanote_data:/data/db
server:
environment:
- SITE_URL="http://localhost:9000"
depends_on:
- db
restart: always
build: .
ports:
- "9000:9000"
links:
- db:mongodb
volumes:
leanote_data:
执行命令:
- docker-compose build
- docker-compose up -d
之后就报错了:
Creating network "leanote_default" with the default driver
ERROR: cannot create network d3c1651b501e74a1e4ba718c0808b76461100be79b6356870caa720340689d7a (br-d3c1651b501e): conflicts with network a36fdb65573061a0fad22902209d2f6ca2e94b72d9bd56567356b3880077e40f (br-a36fdb655730): networks have overlapping IPv4
之前没遇到过这个, 不知道要怎么解决?