- 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/
推薦閱讀
- ArchiCAD 19:The Definitive Guide
- 電氣自動化專業英語(第3版)
- Clojure Data Analysis Cookbook
- 基于LabWindows/CVI的虛擬儀器設計與應用
- Dreamweaver CS3網頁制作融會貫通
- Hadoop 2.x Administration Cookbook
- TIBCO Spotfire:A Comprehensive Primer(Second Edition)
- 機器學習流水線實戰
- 統計學習理論與方法:R語言版
- 大數據技術基礎:基于Hadoop與Spark
- Learning ServiceNow
- Unreal Development Kit Game Design Cookbook
- 電動汽車驅動與控制技術
- 算法設計與分析
- 納米集成電路制造工藝(第2版)