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

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/
主站蜘蛛池模板: 湘乡市| 西平县| 崇阳县| 竹山县| 荣昌县| 博白县| 永城市| 沧州市| 大宁县| 福安市| 海淀区| 耒阳市| 治多县| 英德市| 皋兰县| 唐山市| 阜城县| 安达市| 卫辉市| 台前县| 娱乐| 娱乐| 瑞昌市| 驻马店市| 连州市| 平舆县| 五常市| 平陆县| 永德县| 曲阜市| 象山县| 本溪| 漯河市| 大港区| 汶上县| 教育| 上思县| 克什克腾旗| 舒城县| 河津市| 澄迈县|