ysicing
V2EX  ›  Docker

war 包使用 dockerfile 构建镜像

  •  
  •   ysicing ·
    ysicing · Mar 28, 2017 · 4694 views
    This topic created in 3362 days ago, the information mentioned may be changed or developed.

    Dockerfile :

    FROM hub.c.163.com/library/tomcat:latest
    ADD data.war /usr/local/tomcat/webapps/
    EXPOSE 8080
    CMD ["catalina.sh", "run"]
    

    构建玩镜像后,访问 url 显示的是关于 tomcat 而不是项目相关的,求姿势

    Supplement 1  ·  Mar 31, 2017
    已经解决, url+包名 /
    2 replies    2017-03-29 15:02:26 +08:00
    caixiexin
        1
    caixiexin  
       Mar 28, 2017
    你的 url/data 试试?
    huawuya
        2
    huawuya  
       Mar 29, 2017
    替换 tomcat/webapp/ROOT/index.html ,里面改成跳转到你的首页 URL
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2878 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:20 · PVG 23:20 · LAX 08:20 · JFK 11:20
    ♥ Do have faith in what you're doing.