-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile for apollo-portal
39 lines (32 loc) · 1.61 KB
/
Dockerfile for apollo-portal
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
28
29
30
31
32
33
34
35
36
37
38
39
# Dockerfile for apollo-portal
# 1. Copy apollo-portal-${VERSION}-github.zip to current directory
# 2. Build with: docker build -t apollo-portal .
# 3. Run with: docker run -p 8070:8070 -e DS_URL="jdbc:mysql://52.187.110.104:6033/ApolloPortalDB?characterEncoding=utf8" -e DS_USERNAME=root -e DS_PASSWORD=root -e DEV_META=http://13.76.97.141:8088 -d -v /tmp/logs:/opt/logs --name apollo-portal apollo-portal
FROM openjdk:8-jre-alpine
MAINTAINER ameizi <sxyx2008@163.com>
ENV VERSION 1.5.0
ENV SERVER_PORT 8070
# DataSource Info
ENV DS_URL ""
ENV DS_USERNAME ""
ENV DS_PASSWORD ""
# Environmental variable declaration (meta server url, different environments should have different meta server addresses)
ENV DEV_META ""
ENV FAT_META ""
ENV UAT_META ""
ENV LPT_META ""
ENV PRO_META ""
RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache procps unzip curl bash tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
ADD apollo-portal-1.5.0-github.zip /apollo-portal/apollo-portal-1.5.0-github.zip
RUN unzip /apollo-portal/apollo-portal-1.5.0-github.zip -d /apollo-portal \
&& rm -rf /apollo-portal/apollo-portal-1.5.0-github.zip \
&& sed -i '$d' /apollo-portal/scripts/startup.sh \
&& chmod +x /apollo-portal/scripts/startup.sh \
&& echo "tail -f /dev/null" >> /apollo-portal/scripts/startup.sh
EXPOSE $SERVER_PORT
CMD ["/apollo-portal/scripts/startup.sh"]