soulzz
V2EX  ›  问与答

docker-compose volume 疑问

  •  
  •   soulzz · Dec 8, 2021 · 1032 views
    This topic created in 1798 days ago, the information mentioned may be changed or developed.
    windows11
    docker desktop 最新版

    docker-compsoe.yml 中指定了
    手动在 docker desktop 中新建的的 volume 名称:static_content

    services:
    xxx:
    container_name: web-api
    image: xxx-web:0.1
    volumes:
    - weblogs:/home/java/logs
    - static_content:/home/website/dist/Files
    restart: always
    ports:
    - 8101:8101
    volumes:
    weblogs:
    static_content:


    启动后并没有按照预期使用我创建的 volume
    而是使用了文件夹名称后加 static_content 的形式:xxxx_static_content

    我哪里写错了吗
    soulzz
    soulzz
    OP
    Dec 8, 2021
    1
    ok 解决了

    volumes:
    weblogs:
    external: true
    static_content:
    external: true
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4670 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:39 · PVG 09:39 · LAX 17:39 · JFK 20:39
    ♥ Do have faith in what you're doing.