forked from apolloconfig/apollo-quick-start
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (22 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Dockerfile for apollo quick start
# Build with:
# docker build -t apollo-quick-start .
# Run with:
# docker-compose up
FROM openjdk:8-jre-alpine
MAINTAINER nobodyiam<https://github.com/nobodyiam>
COPY apollo-all-in-one.jar /apollo-quick-start/apollo-all-in-one.jar
COPY client /apollo-quick-start/client
COPY demo.sh /apollo-quick-start/demo.sh
COPY portal/apollo-portal.conf /apollo-quick-start/portal/apollo-portal.conf
COPY service/apollo-service.conf /apollo-quick-start/service/apollo-service.conf
EXPOSE 8070 8080
RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& 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/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"]