Alpine Linux:BusyBoxテールをGNUテールに置き換える

Alpine Linux:BusyBoxテールをGNUテールに置き換える

実行中のバックグラウンドテールプロセスが自動的に終了するように、tail ... --pid=PIDDockerコンテナで画像ベースのオプションを使用する必要があります。Alpine

残念ながら、BusyBox tailAlpine Dockerイメージに提供されているイメージはこの機能をサポートしていません。

交換方法を説明する資料を探しましたが、成功しませんでした。

画像サイズが重要なので、他の基本画像を使用したくありません。

どういうわけかGNUテールに切り替えることができますか?

ベストアンサー1

解決策は次のとおりです。

apk add --no-cache bash coreutils

今後:

tail --version
tail: unrecognized option: version
BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.

後ろに:

tail --version
tail (GNU coreutils) 9.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

おすすめ記事