Monday, January 3, 2022

[SOLVED] Docker has no package manager

Issue

Using the image firesh/nginx-lua. After running the docker Image I want to install some things but it has no apt / apt-get or any other package manager.

I tried to install apt on the docker but it requires curl, which does not exist as well.

Any solution for that? I cannot install anything manually on this docker

Thanks..


Solution

It's because the base image used alpine, it has apk, you can use apk as apk is the default package manager on alpine. You can add things using apk add <desired_thing>, before this also do apk update.

Ex: for adding curl:

  • apk update
  • apk add curl


Answered By - Sahadat Hossain