nyxsonsleep
V2EX  ›  Docker

dockerfile 怎么 COPY 软链接文件夹?

  •  
  •   nyxsonsleep · Dec 21, 2024 · 2043 views
    This topic created in 500 days ago, the information mentioned may be changed or developed.

    COPY softlinks image/realdir

    提示 softlinks 不存在。我需要的是 host/realdir. softlinks->host/realdir

    背景:softlinks 指定的文件夹是动态变化的,所以目前只能使用这个软链接。

    3 replies    2024-12-22 08:48:55 +08:00
    recall704
        1
    recall704  
       Dec 22, 2024 via iPhone
    那就加到 makefile 里,先生成再构建
    flyqie
        2
    flyqie  
       Dec 22, 2024 via Android
    为什么不在运行时做而要写到 dockerfile ?

    dockerfile 感觉很难做到这一点吧?因为貌似 docker 镜像目的就是与宿主机尽量不产生关联。
    QHKZ
        3
    QHKZ  
       Dec 22, 2024 via iPhone
    试试 CMD 命令,或者直接用 shell 一键脚本一层做完
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 23:34 · PVG 07:34 · LAX 16:34 · JFK 19:34
    ♥ Do have faith in what you're doing.