简体   繁体   English

在 docker 图像上使用 curl 而不是 wget

[英]using curl instead wget on docker image

we are using wget inside docker images which works ok and we want to switch to curl however it doesnt work我们在 docker 图像中使用wget工作正常,我们想切换到curl但它不起作用

This is command before with wget这是 wget 之前的命令

wget https://github.sme.corp/wiki-raw/dwi/bre/dists/stable/Key.gpg.key -O- | apt-key add - && \
echo "deb https://github.sme.corp/wiki-raw/dwi/bre/ stable main" > /etc/apt/sources.list.d/bre.list && \

I try to change it to curl like following and it doesn't work ( I dont see the same output) , any idea what am I missing here?我尝试将其更改为如下所示的卷曲,但它不起作用(我没有看到相同的输出),知道我在这里遗漏了什么吗?

curl -sSL -f -k https://github.sme.corp/wiki-raw/dwi/bre/dists/stable/Key.gpg.key | apt-key add - && \
echo "deb https://github.sme.corp/wiki-raw/dwi/bre/ stable main" > /etc/apt/sources.list.d/bre.list && \

尝试像下面这样的 curl 命令

curl -f -L -o <<weblink to the file>>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM