FROM anapsix/alpine-java:8_server-jre_unlimited

MAINTAINER XinTong

RUN mkdir -p /xintong/server

WORKDIR /xintong/server

EXPOSE 8080
ADD ./target/ruoyi-admin.jar ./app.jar
ADD start.sh ./start.sh
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
    && apk add --no-cache tzdata \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata \
    && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache
RUN chmod +x ./start.sh
ENTRYPOINT ["./start.sh"]

#EXPOSE 8081
#ADD ./target/ruoyi-admin.jar ./app.jar
#ADD start-duty.sh ./start.sh
#RUN chmod +x ./start.sh
#ENTRYPOINT ["./start.sh"]

#EXPOSE 8082
#ADD ./target/ruoyi-admin.jar ./app.jar
#ADD start-plan.sh ./start.sh
#RUN chmod +x ./start.sh
#ENTRYPOINT ["./start.sh"]

#EXPOSE 8083
#ADD ./target/ruoyi-admin.jar ./app.jar
#ADD start-resource.sh ./start.sh
#RUN chmod +x ./start.sh
#ENTRYPOINT ["./start.sh"]





#docker build -t docker.xt.wenhq.top:8083/docker_r/yjzh_server:1.0 .
#docker run --privileged=true  -itd --name yjzh_server -v /sys/fs/cgroup:/sys/fs/cgroup:ro  -p 8080:8080  docker.xt.wenhq.top:8083/docker_r/yjzh_server:1.0

#docker push docker.xt.wenhq.top:8083/docker_r/yjzh_server:1.0

#docker pull docker.xt.wenhq.top:8083/docker_r/yjzh_server:1.0

#docker images|grep none|awk '{print $3}'|xargs docker rmi -f
