I am running a docker container from, alpine-linux image. It contains zcat but not zless and zgrep. How to install it in the container?
Assuming a fresh image, update the package index:
apk update
Then add the gzip package, containing zless, zgrep etc.:
apk add gzip
See the package contents here: https://pkgs.alpinelinux.org/contents?branch=v3.5&name=gzip&arch=aarch64&repo=main
If you're wondering why zcat is included but not the other tools, even though zcat is in the gzip package, it's included as part of another package:
/ # apk info --who-owns $(which zcat)
/bin/zcat symlink target is owned by busybox-1.25.1-r0