########################################################
#   docker build -t ems-server:1.0 .
########################################################

FROM openjdk:8

MAINTAINER learshaw@gmail.com

# 创建目录
RUN mkdir -p /usr/local/java && \
    mkdir -p /opt/ems/{ruoyi-gateway,ruoyi-auth,ruoyi-system,ems-server,ems-dev-adapter}
WORKDIR /opt/ems

# 添加
COPY ruoyi-gateway.jar /opt/ems/ruoyi-gateway/
COPY ruoyi-auth.jar /opt/ems/ruoyi-auth/
COPY ruoyi-system.jar /opt/ems/ruoyi-system/
COPY ems-server.jar /opt/ems/ems-server/
COPY ems-dev-adapter.jar /opt/ems/ems-dev-adapter/
COPY start-all.sh /opt/ems/
RUN chmod 755 /opt/ems/start-all.sh

# 端口
EXPOSE 9100
EXPOSE 9200
EXPOSE 9201
EXPOSE 9202
EXPOSE 9203

CMD ["sh", "/opt/ems/start-all.sh"]