Ad Widget

Collapse

Python in Zabbix Server Container

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jan.Bechtold
    Junior Member
    • Jul 2024
    • 2

    #1

    Python in Zabbix Server Container

    Hi, i have an Zabbix Setup with the Container Image "zabbix-server-mysql-ol" running.
    I tried to install an python Script for SMS alerts (seven.io) in the section media types. But Python is not availalable within the Container Image.

    So i had a look into the container. There is no package manager (Oracle Linux should have dnf).
    How can i install python in the Container? Or is there an workaround?
    best regards





  • irontmp
    Member
    • Sep 2023
    • 36

    #2
    Originally posted by Jan.Bechtold
    Hi, i have an Zabbix Setup with the Container Image "zabbix-server-mysql-ol" running.
    I tried to install an python Script for SMS alerts (seven.io) in the section media types. But Python is not availalable within the Container Image.

    So i had a look into the container. There is no package manager (Oracle Linux should have dnf).
    How can i install python in the Container? Or is there an workaround?
    best regards




    Installing Python in a Zabbix container image 'zabbix-server-mysql-ol' without a package manager is not a straightforward process. Since the container image is based on Oracle Linux, which does not come with a package manager by default 1, you'll need to use alternative methods.

    One possible approach is to use the docker or podman command to install Python inside the container. You can do this by running a command like docker run or podman run with the -it flag, which allows you to access the container's shell 2. From there, you can download and install Python manually.

    Another option is to create a new Dockerfile that inherits from the 'zabbix-server-mysql-ol' image and installs Python using a script or by copying the Python binaries into the container 6.

    Alternatively, you can also use a multi-stage build process to create a new image that includes Python. This would involve creating a temporary image with a package manager, installing Python, and then copying the Python binaries to the final image 9.

    Information is missing on the specific steps to install Python in a 'zabbix-server-mysql-ol' container image without a package manager. However, the above approaches can be explored to achieve the desired outcome.

    Note: The provided contexts do not provide a direct solution to installing Python in a 'zabbix-server-mysql-ol' container image without a package manager. The above answer is based on general knowledge and may require additional research and experimentation to implement.

    Comment

    • irontmp
      Member
      • Sep 2023
      • 36

      #3
      Originally posted by Jan.Bechtold
      Hi, i have an Zabbix Setup with the Container Image "zabbix-server-mysql-ol" running.
      I tried to install an python Script for SMS alerts (seven.io) in the section media types. But Python is not availalable within the Container Image.

      So i had a look into the container. There is no package manager (Oracle Linux should have dnf).
      How can i install python in the Container? Or is there an workaround?
      best regards




      Installing Python in a Zabbix container image 'zabbix-server-mysql-ol' without a package manager is not a straightforward process. Since the container image is based on Oracle Linux, which does not come with a package manager by default 1, you'll need to use alternative methods. One possible approach is to use the docker or podman command to install Python inside the container. You can do this by running a command like docker run or podman run with the -it flag, which allows you to access the container's shell 2. From there, you can download and install Python manually. Another option is to create a new Dockerfile that inherits from the 'zabbix-server-mysql-ol' image and installs Python using a script or by copying the Python binaries into the container 6. Alternatively, you can also use a multi-stage build process to create a new image that includes Python. This would involve creating a temporary image with a package manager, installing Python, and then copying the Python binaries to the final image 9. Information is missing on the specific steps to install Python in a 'zabbix-server-mysql-ol' container image without a package manager. However, the above approaches can be explored to achieve the desired outcome. Note: The provided contexts do not provide a direct solution to installing Python in a 'zabbix-server-mysql-ol' container image without a package manager. The above answer is based on general knowledge and may require additional research and experimentation to implement.

      Comment

      • Jan.Bechtold
        Junior Member
        • Jul 2024
        • 2

        #4
        Thx, for the reply. But Oracle Linux (even the smallest image) should have dnf as default package manager. I found a smarter workaround as "copy binarys" or something:

        The ubuntu image has an package manager installed (apt). So i just use the ubunutu image (seems the only one with package manager from zabbix).

        Comment

        Working...