1

I need to use the tail ... --pid=PID option in my docker container that is based on Alpine image in order to I can kill the running background tail process automatically.

Unfortunately the BusyBox tail that is available in the Alpine Docker image doesn't support this feature.

I am trying to find a material that describes the process how to replace it but no luck.

I don't want to use another base image because the image size is important.

Is it possible to switch to the GNU tail somehow?

1 Answer 1

2

This is the solution:

apk add --no-cache bash coreutils 

Before:

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

After:

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. 
1
  • Just add the coreutils package. bash for alpine will be superfluous Commented Apr 4, 2024 at 12:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.