Hello everyone. I have a specialized module that I transfer from OTRS. The module is correctly installed on OTOBO, but it requires specialized Perl libraries, such as:AnyEvent, IO::Interactive module, Math::Random::Secure module, Crypt::PasswdMD5. Unfortunately, my knowledge of docker is initial, but I was able to load the shell from there, but I can’t install anything, because I don’t have a root inside the conrainer. Judging by my observations, there are root and otobo users inside the container, I am logged in under otobo, which does not have root rights. sudo is not installed in this image. Who can tell me how to install the perl libraries inside the image?
adding new Perl modules to a container would essentially mean to create a new Docker image. This is feasible, but the recommendation is to go an easier route. Modules can be installed within _/opt/otobo_, which is a volume that lives outside the Docker container. CPAN modules can be installed as the user otobo.
On the Docker host you can log in as otobo with the command:
docker exec -it otobo_web_1 bash
The environment variable PERL5LIB is preset there.
otobo@a1a51661d02f:~$ ls -l local ls: cannot access 'local': No such file or directory
The location _/opt/otobo_install/local/lib/perl5_ is used for the CPAN modules that are delivered with the image. _/opt/otobo/local/lib/perl5_ does initially not exist, but is intended for locally added modules.
Install module from CPAN, or maybe from a local Pinto repository, with using local::lib.
otobo@a1a51661d02f:~$ cpanm -l local Acme::123 --> Working on Acme::123 Fetching http://www.cpan.org/authors/id/N/NA/NATHANM/Acme-123-0.04.zip ... OK Configuring Acme-123-0.04 ... OK Building and testing Acme-123-0.04 ... OK Successfully installed Acme-123-0.04 1 distribution installed otobo@a1a51661d02f:~$ perldoc -l Acme::123 /opt/otobo/local/lib/perl5/Acme/123.pm
Please tell us whether this worked for you, as I haven’t really used this feature myself.This info should also be included in the documentation. I have created the issue https://github.com/RotherOSS/doc-otobo-dev/issues/5 for that.
I’ve tried various methods, including this one https://doc.otobo.org/manual/installation/stable/en/content/installing-perl-modules.html , starting with the words “ Special care must be taken when OTOBO runs within Docker…“. This method helped partially, not all modules can be installed. I gave up on the idea of using docker, it is good for me for tests, in production, with a lot of integrations, it adds unsolvable difficulties. Thank you
do you have an example of a module that can’t be installed? Out of curiosity I tried to install the modules mentioned in the initial post, and it seem to work seamlessly.
otobo@40d571709ab9:~$ cpanm -l local Crypt::PasswdMD5 --> Working on Crypt::PasswdMD5 Fetching http://www.cpan.org/authors/id/R/RS/RSAVAGE/Crypt-PasswdMD5-1.41.tgz ... OK Configuring Crypt-PasswdMD5-1.41 ... OK Building and testing Crypt-PasswdMD5-1.41 ... OK Successfully installed Crypt-PasswdMD5-1.41 1 distribution installed otobo@40d571709ab9:~$ perldoc -l Crypt::PasswdMD5 /opt/otobo/local/lib/perl5/Crypt/PasswdMD5.pm
Wir verwenden Cookies, um diese Website optimal gestalten und laufend verbessern zu können. Für Analyse und Statistik nutzen wir Google Analytics (anonymisiert).
Unsere Website verwendet Cookies. Cookies sind kleine Textdateien, die beim Aufruf von Websites im Internetbrowser bzw. vom Internetbrowser auf Ihrem Endgerät gespeichert werden. Diese Cookies enthalten eine charakteristische Zeichenfolge, die eine eindeutige Identifizierung des Browsers beim erneuten Aufrufen der Website ermöglichen.
Sie können das Setzen von Cookies jederzeit über eine entsprechende Einstellung in Ihrem Internetbrowser verhindern. Bereits gesetzte Cookies können jederzeit manuell oder automatisiert gelöscht werden. Dies ist in allen gängigen Internetbrowsern möglich. Wird das Setzen von Cookies im Browser deaktiviert, sind unter Umständen nicht alle Funktionen der Website vollumfänglich nutzbar.
Wir gehen grundsätzlich sehr sparsam mit Cookies um.
Detaillierte Informationen finden Sie in Abschnitt 4 unserer Hinweise zum Datenschutz.
Technisch erforderliche Cookies
Diese Cookies sind erforderlich, um die Darstellung dieser Website und einiger ihrer Features zu gewährleisten.
Deshalb bieten wir hier auch keine Möglichkeit an, diese Cookies zu deaktivieren.
Dessen ungeachtet können Sie jederzeit durch entsprechende Einstellungen in Ihrem Browser alle Cookies deaktivieren. Unter Umständen stehen Ihnen dann nicht mehr alle Funktionalitäten dieser Website zur Verfügung.
Weitere Informationen zu den gesetzten Cookies und zur Speicherdauer finden Sie in Abschnitt 4 unserer Hinweise zum Datenschutz.
Cookies von Google Analytics
Beim Besuch der Website werden Cookies von Google Analytics gesetzt, die eine Analyse der Benutzung unserer Website durch Sie ermöglichen. Ihre IP-Adresse wird dabei durch technische Vorkehrungen pseudonymisiert (IP-Anonymisierung und Deaktivierung der User-ID). Eine Zuordnung der Daten zum aufrufenden Nutzer ist daher nicht mehr möglich. Die Daten werden nicht gemeinsam mit anderen personenbezogenen Daten der Nutzer gespeichert.
Wenn Sie nicht möchten, dass wir Ihren Besuch auf unserer Website verfolgen, können Sie das Tracking in Ihrem Browser hier deaktivieren:
Hinweise zum Datenschutz
Detaillierte Informationen zum Einsatz von Cookies sowie unsere Datenschutzerklärung finden Sie hier: