If you can only shell into container with bin/sh (in case bin/bash doesn't work)and apt or apt-get doesn't work in the container, check whether apk is installed by entering apk in command prompt inside the container.If yes, you can install nano as follows:apk add nano
then nano will work as usual