Docker-compose-web

为君一笑 提交于 2020-03-09 20:48:23
[root@mt-lingshui-math math-junior]# cat Dockerfile 
FROM java:8
MAINTAINER java8 images
VOLUME /tmp
COPY minte-math-junior-2.0.1.RELEASE.jar app.jar
RUN bash -c "touch /app.jar"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
EXPOSE 6060
ENTRYPOINT ["java","-jar","/app.jar"]

############################################
[root@mt-lingshui-math math-junior]# cat docker-compose.yml 
version: '3'
services: 
  web: 
    image: math-junior:latest 
    build: ./
    restart: always
    ports: 
      - "6060"
#    volumes: 
#      - "/opt/Docker-Ser-mtmath/math-junior/logs:/logs"


#  springbt-math-junior02: 
#    container_name: springbt-math-junior02
#    image: springbt-math-junior-image
#    build: ./
#    restart: always
#    ports:
#      - "3032:6060"
#    volumes:
#      - "/opt/Docker-Ser-mtmath/springboot-math-junior/logs:/logs"
#    networks:
#      mall-network:
#        aliases:
#          - math-junior02
#    deploy:
#      mode: replicated
#      replicas: 1
#
#networks:
#  mall-network:
#    driver: bridge

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!