-
Hi All I've got an "amateurish" question - I'm running Semaphore in a container, and have a few playbooks for powering my ESXi hosts on and off at certain times. These use Roles that have dependencies on some Python libraries, like VMWare's pyVomi etc... I've limited experience with Ansible, but from what I understand, using requirements.yml is the best way to grab Roles from Ansible Galaxy - But how do I get Python libraries installed as-well? The only solution I can think of, and what I'm currently doing, is manually editing the Dockerfile used to build Semaphore, and getting it to include pip3, which in turn installs the python libraries. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Good question, i would like to know the answer too. |
Beta Was this translation helpful? Give feedback.
-
Not sure if you found a suitable workflow for this but unless Semaphore decided to provide a mechanism for such things at runtime (which isn't really the right way to do it anyway, most of the time) then you're using the right approach, roughly, I would say. Better approach though would be to create a child image from the official Semaphore image rather than manipulating the official one directly. For example: FROM: semaphoreui/semaphore
RUN "your pip installs here" This way you can easily rebuild your image after upstream changes to the official image without having to merge your changes into the official Dockerfile like you are now.
When there are upstream changes to the official image you just re-build yours, no manual Dockerfile changes required on your part. |
Beta Was this translation helpful? Give feedback.
-
You can put |
Beta Was this translation helpful? Give feedback.
You can put
requirements.txt
file to directory$SEMAPHORE_CONFIG_PATH
and this file will be used to install python packages.