Skip to content

Commit

Permalink
fix docker image name
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam committed Oct 7, 2017
1 parent e337245 commit ff9f28a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
&& apk add --no-cache curl bash \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& sed -i'.bak' '/db_url/s/localhost/db/g' /apollo-quick-start/demo.sh \
&& sed -i'.bak' '/db_url/s/localhost/apollo-db/g' /apollo-quick-start/demo.sh \
&& sed -i "s/exit 0;/tail -f \/dev\/null/g" /apollo-quick-start/demo.sh

CMD ["/apollo-quick-start/demo.sh", "start"]
18 changes: 8 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,30 @@ services:
image: apollo-quick-start
container_name: apollo-quick-start
depends_on:
- db
- apollo-db
ports:
- "8080:8080"
- "8070:8070"
volumes:
- /tmp/logs:/opt/logs
links:
- db
- apollo-db

db:
apollo-db:
image: mysql:5.7
container_name: db
container_name: apollo-db
environment:
TZ: Asia/Shanghai
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
depends_on:
- dbdata
- apollo-dbdata
ports:
- "13306:3306"
volumes:
- ./sql:/docker-entrypoint-initdb.d
volumes_from:
- dbdata
- apollo-dbdata

dbdata:
apollo-dbdata:
image: alpine:latest
container_name: dbdata
container_name: apollo-dbdata
volumes:
- /var/lib/mysql

0 comments on commit ff9f28a

Please sign in to comment.