Dockerfile 1.14 KB
Newer Older
冯靖 committed
1 2 3 4
# Dockerfile for apollo-portal
# Build with:
# docker build -t apollo-portal .
# Run with:
5 6 7
# docker run -p 8080:8080 -d -v /tmp/logs:/opt/logs --name apollo-portal apollo-portal
# Or if 8080 was taken:
# docker run -p 8070:8080 -d -v /tmp/logs:/opt/logs --name apollo-portal apollo-portal
冯靖 committed
8

nobodyiam committed
9
FROM openjdk:8-jre-alpine
冯靖 committed
10 11
MAINTAINER ameizi <sxyx2008@163.com>

nobodyiam committed
12
ENV VERSION 0.11.0-SNAPSHOT
冯靖 committed
13

nobodyiam committed
14 15 16 17
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 procps unzip curl bash tzdata \
冯靖 committed
18 19 20 21 22 23 24 25 26 27 28 29
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

ADD apollo-portal-${VERSION}-github.zip /apollo-portal/apollo-portal-${VERSION}-github.zip

RUN unzip /apollo-portal/apollo-portal-${VERSION}-github.zip -d /apollo-portal \
    && rm -rf /apollo-portal/apollo-portal-${VERSION}-github.zip \
    && sed -i '$d' /apollo-portal/scripts/startup.sh \
    && echo "tail -f /dev/null" >> /apollo-portal/scripts/startup.sh

EXPOSE 8080

30
CMD ["/apollo-portal/scripts/startup.sh"]