【问题标题】:using curl instead wget on docker image在 docker 图像上使用 curl 代替 wget
【发布时间】:2020-05-25 18:59:27
【问题描述】:

我们在 docker 镜像中使用 wget 可以正常工作,我们想切换到 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 -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 -O(大写O)
  • 你得到了什么输出?您希望看到什么行为?
  • @Ntwobike - 尝试已经没有成功
  • @DavidMaze - 这是我执行 curl 命令的库的一些自定义输出...

标签: linux docker curl wget


【解决方案1】:

尝试如下 curl 命令

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

【讨论】:

    猜你喜欢
    • 2018-08-06
    • 2022-06-22
    • 2011-10-22
    • 2012-03-13
    • 2018-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多