是否有任何WGET命令可以从一个Docker容器文件夹下载.jpg图片到另一个容器?

发布于 2025-01-25 18:04:50 字数 375 浏览 7 评论 0原文

我是Docker的新手,我有一项任务可以使用Container1路径的WGET和IP从Docker Container1下载图片。 详细: container1:我已经从URL下载了一些图片到Container1 Container2:我已经启用并启用了Apache服务器,并使用WGET下载了Container1中的那些图片,我能够下载一些图片,但我发现这些不是我在Container1中下载的图片。

我正在使用此wget命令' wget -nd -h -h -p -a jpg,jpeg,png,gif -e robots = OFF 172.17.0.0.2/' 我在Container1 Media文件夹中有图片。是否可以使用IP下载,如果没有的话,如果有办法完成此任务,请告诉我?感谢您的帮助。

I am new to docker and I have a task to download pictures from a docker container1 to container2 using wget and IP of container1's path.
In detail:
container1:I have downloaded some pictures from a URL into container1
container2:I have pinged and enabled the apache server and used wget to download those pictures that are there in container1, I was able to download some pictures but I found those are not the pictures that I downloaded in container1.

I am using this wget command 'wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off 172.17.0.2/'
I have my pictures in the container1 media folder. Is it possible to download using IP, if not and if there is a way to do this task, please let me know? Thanks for the help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人哭 2025-02-01 18:04:50

因此,我找到了命令,首先我在Conatiner1映像的根路径中创建了一个文件夹图片,该图片恰好是我的Web服务器容器:/var/www/www/html/pics
我将所有图片从网站下载到此文件夹中,
从另一个容器IE,
在container2中,我使用了命令 wget -r -p/pathtodownload -a jpg,jpeg,gif,gif,png -e robots = off ipaddress/pics ,从contains1下载图片

So, I found the command, first I created a folder pics in the root path of the conatiner1 image which happens to be my webserver container: /var/www/html/pics
I downloaded all the pictures from a website into this folder and
from another container i.e.,
In container2 I used the command wget -r -P /pathtodownload -A jpg,jpeg,gif,png -e robots=off IPADDRESS/pics which downloads the pictures from container1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文