官术网_书友最值得收藏!

  • 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/
主站蜘蛛池模板: 虎林市| 南投市| 内乡县| 丽江市| 南靖县| 游戏| 蒙自县| 武强县| 井研县| 友谊县| 开封县| 江安县| 同德县| 桓台县| 江川县| 宁化县| 中卫市| 长武县| 通榆县| 罗源县| 镇安县| 墨脱县| 甘德县| 嘉义县| 台北市| 肃北| 黑河市| 龙川县| 蓝山县| 通城县| 邻水| 瑞丽市| 永兴县| 鞍山市| 卢龙县| 临夏市| 邛崃市| 崇仁县| 行唐县| 怀集县| 赤壁市|