- Deployment with Docker
- Srdjan Grubor
- 130字
- 2021-07-02 23:22:14
Adding files from the internet
What about trying to add files to your container that are not hosted locally and/or due to licensing you cannot include them in your repository where the Dockerfile lives? For this specific purpose, there is the ADD directive. This command downloads the file from the URI provided and puts it in the container. If the file is local compressed archive, such as a .tgz or a .zip file and the target path ends with a slash, it will get expanded into that directory, making this a very useful option as opposed to COPY. In the example that we're writing here, we will take a semi-random file from GitHub and put it in the directory to be included with the following:
ADD https://raw.githubusercontent.com/moby/moby/master/README.md \
$SRV_PATH/
推薦閱讀
- AutoCAD繪圖實用速查通典
- STM32G4入門與電機控制實戰:基于X-CUBE-MCSDK的無刷直流電機與永磁同步電機控制實現
- 21天學通Java
- 塊數據5.0:數據社會學的理論與方法
- Splunk Operational Intelligence Cookbook
- 樂高機器人—槍械武器庫
- INSTANT Drools Starter
- Red Hat Linux 9實務自學手冊
- Microsoft System Center Confi guration Manager
- 零起點學西門子S7-200 PLC
- Linux嵌入式系統開發
- 從零開始學SQL Server
- R Machine Learning Projects
- Spark大數據商業實戰三部曲:內核解密|商業案例|性能調優
- Linux Shell Scripting Cookbook(Third Edition)