nyxsonsleep
V2EX  ›  Docker

dockerfile 怎么 COPY 软链接文件夹?

  •  
  •   nyxsonsleep · Dec 21, 2024 · 2663 views
    This topic created in 691 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
    recall704
    Dec 22, 2024 via iPhone
    1
    那就加到 makefile 里,先生成再构建
    flyqie
    flyqie
    Dec 22, 2024 via Android
    2
    为什么不在运行时做而要写到 dockerfile ?

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