weixin_39772651
weixin_39772651
2020-12-06 22:34

U/jgl/paasta 10492 quiet logs

Make itest logs less verbose by quieting the output of apt-get by redirecting to /dev/null

I attempted to do this the "clean" way, with the -qq argument, but still got a lot of extraneous output, from the forked dpkg process. I tried to pass along an option to dpkg to quiet its output, but that also did not work. [1]

[1] https://peteris.rocks/blog/quiet-and-unattended-installation-with-apt-get/

该提问来源于开源项目:Yelp/paasta

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39707851 weixin_39707851 4月前

    Looks better. I can see the all the logs in travis now without going raw.

    Can you also add DEBIAN_FRONTEND=noninteractive ? This is considered best docker practice and will remove some of the debconf warnings that are going to stderr.

    点赞 评论 复制链接分享
  • weixin_39707851 weixin_39707851 4月前

    Ship

    点赞 评论 复制链接分享
  • weixin_39955149 weixin_39955149 4月前

    Adding ENV DEBIAN_FRONTEND=noninteractive goes against docker best practices as you're exposing this environment variable to your runtime (and to all the commands) -- the best practice here is to only include it on the apt-get install command

    点赞 评论 复制链接分享
  • weixin_39955149 weixin_39955149 4月前

    An aside: I've been debugging apt installation related stuff and it's very very difficult with all of them piped to /dev/null

    点赞 评论 复制链接分享