I have the docker file:
‘
FROM python:3.9-slim
RUN apt-get update && apt-get install -y openssh-server
RUN pip install
cryptography
bcrypt
pynacl
paramiko
scp
loguru
pydantic
psutil
CMD [“/usr/sbin/sshd”, “-D”, “-h”, “/etc/ssh/key”]
WORKDIR /code
‘
And this main.py file import references:
import psutil
from loguru import logger
from paramiko import SSHClient
from pydantic import BaseModel
from scp import SCPClient
When running docker-compose with:
COMMAND='python main.py "hostname" 10.0.0.1,10.0.0.2,192.168.0.5' docker-compose up
I get this output:
infra-host_a-1 | Traceback (most recent call last):
infra-host_a-1 | File "main.py", line 10, in <module>
infra-host_a-1 | from loguru import logger
infra-host_a-1 | ModuleNotFoundError: No module named 'loguru'
infra-host_a-1 exited with code 1
How do I solve this?