[Solution] Alpine Docker apt-get: not found


# apt-get bash
/bin/sh: apt-get: not found

If you try to install a package on Alpine Linux using apt-get package manager you will get an error saying "apt-get not found" this is because there is no apt-get tool available on Alpine, you should be using apk (Alpine Package Keeper) instead which is the pre-installed.

Know More: Alpine Package Keeper

Solution:

Make use of apk add to install packages on Alpine.

# apk add bash
(1/4) Installing ncurses-terminfo-base (6.3_p20220521-r0)
(2/4) Installing ncurses-libs (6.3_p20220521-r0)
(3/4) Installing readline (8.1.2-r0)
(4/4) Installing bash (5.1.16-r2)
Executing bash-5.1.16-r2.post-install
Executing busybox-1.35.0-r17.trigger
OK: 22 MiB in 25 packages
Solution - Alpine Docker apt-get not found - apk add

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap