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

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/
主站蜘蛛池模板: 泌阳县| 泗洪县| 富蕴县| 东乡| 赫章县| 榕江县| 柳江县| 米泉市| 保山市| 宁阳县| 屏东市| 红安县| 大新县| 依兰县| 泗洪县| 内乡县| 岐山县| 无锡市| 绵竹市| 莫力| 安龙县| 海兴县| 双柏县| 林周县| 晋宁县| 阿图什市| 潜山县| 磐安县| 北京市| 青海省| 海林市| 同江市| 邻水| 平度市| 卓资县| 广西| 河西区| 若羌县| 富顺县| 万盛区| 南宁市|