LoginSignup
2
1

More than 3 years have passed since last update.

[Docker]Alpineでの容量可視化ツール「duf」の導入

Posted at

はじめに

  • システム内での容量確認のため、dfやduコマンドを利用する事は多い。
  • そこでdufという容量可視化ツールをmacで利用していた。
  • 便利であったため、同様にDocker内のalpineへも展開する必要が発生。
  • 今回は、Docker内のAlpineLinuxへのdufの導入を記録する。

環境

  • alpine:edge

手順

必要ファイルの取得

  • 以下のコマンドで、任意の場所に必要なバイナリを取得する。
    • apkのパッケージとして用意されていないため。
    • wgetコマンドがなければ、curlコマンドで代替。
# 取得場所の作成・移動
mkdir ~/work
cd ~/work
# バイナリの取得
wget https://github.com/muesli/duf/releases/download/v0.5.0/duf_0.5.0_linux_amd64.apk
  • wget: bad address 'github.com'のようなエラーが出た場合のみ、/etc/resolve.confを以下のようにを変更
/etc/resolve.conf
# This file is included on the metadata iso
nameserver 8.8.8.8  # 変更

導入

  • 以下のコマンドで、バイナリからdufを取得。
# dufの取得
apk add --allow-untrusted duf_0.5.0_linux_amd64.apk 
  • ※error出力が出るが、利用可能状態ではある。

確認

  • 以下の画面のコマンドのように利用可能か確認。

image

image

image

image

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1