linux - 在 docker 图像上使用 curl 而不是 wget
问题描述
我们正在使用wget
内部 docker 图像,它工作正常,我们想切换到curl
但它不起作用
这是之前使用 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 && \
我尝试将其更改为如下所示的 curl 并且它不起作用(我没有看到相同的输出),知道我在这里缺少什么吗?
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>>
推荐阅读
- ruby-on-rails - rails will_save_change_to 奇怪的行为
- python - 如何在熊猫中正确导入以 00 为前缀的数字数据?
- python - scipy interpolate griddata 极坐标的问题
- php - 在 WordPress 页面模板的 If/Else 语句中发布缩略图 PHP?
- java - 由于 selenium java 中的弹出窗口和 iframe 而遇到麻烦
- javascript - 如何在 webpack 中捆绑动态文件路径?
- vba - 验证 ParamArray 是否包含正确类型的参数
- java - java - 如何跨多个类传递相同的对象?
- regex - 如何替换记事本++中文件的前8个字符?
- makefile - Makefile:48: 目标“htpasswd”的配方失败