requirements.txt
, vous pouvez en installer une liste./opt/zato/current
, le chemin vers pip est /opt/zato/current/bin/pip
.zato
et exécutez cette commande:Remarque - pour installer les bibliothèques, vous devez être connecté au même système et au même utilisateur que celui sous lequel Zato fonctionne. Cela signifie que, si vous avez installé Zato via Docker Quickstart, vous devez entrer dans le conteneur ou y accéder par SSH, puis, en tant qu'utilisateur zato, utiliser pip pour installer les bibliothèques.
Pour entrer dans un conteneur sans utiliser SSH :
# Enter the container
sudo docker exec -it zato bash
# We are inside, now switch to user zato
su - zato
# We are user zato inside the container, we can install an extra library now, e.g.:
/opt/zato/current/bin/pip install --upgrade pandas
[...]
Successfully installed pandas-n.n.n
# Still as user zato, stop the server
zato stop ~/env/qs-1/server1
[wait a few seconds]
# Start it back
zato start ~/env/qs-1/server1
# Confirm that it started
curl localhost:17010/zato/ping
{"pong":"zato","zato_env":{"result":"ZATO_OK","cid":"12e2fab4f2b1","details":""}}
[end of procedure]
Alternativement, pour se connecter au conteneur en utilisant SSH, obtenez d'abord vos informations d'identification et ensuite ssh sur le port 22022 :
# Get the password for user zato to use with SSH
docker exec zato /bin/bash -c 'cat /opt/zato/zato_user_password'
[password is returned here]
# Log in using SSH
ssh zato@localhost -p 22022
[enter the password returned above]
# Now, we are user zato inside the container and we can install an extra library, e.g.:
/opt/zato/current/bin/pip install --upgrade pandas
[...]
Successfully installed pandas-n.n.n
# Still as user zato, stop the server
zato stop ~/env/qs-1/server1
[wait a few seconds]
# Start it back
zato start ~/env/qs-1/server1
# Confirm that it started
curl localhost:17010/zato/ping
{"pong":"zato","zato_env":{"result":"ZATO_OK","cid":"a37edf01640","details":""}}
[end of procedure]