pythonpython-3.xdockeroraclelinux

How to install python36 and python36-dev in docker: oraclelinux:7-slim


Below is Dockerfile. I tired with many combination. Its not working. I need to user Oraclelinux. I am planning to use docker for local development and testing purpose. Could you please help me on this.

  FROM oraclelinux:7-slim

# Installing Oracle Instant client
RUN yum -y install oracle-release-el7 && \
    yum-config-manager --enable ol7_oracle_instantclient && \
    yum -y install oracle-instantclient19.3-basiclite && \
    rm -rf /var/cache/yum

# Installing Python and cs_oracle package
RUN yum install -y oracle-epel-release-el7 && \
    yum install -y python36 && \
    yum install -y python36-dev

Error:

Package python36-3.6.8-1.el7.x86_64 is obsoleted by python3-3.6.8-13.0.1.el7.x86_64 which is already installed
--> Processing Dependency: python36-libs(x86-64) = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-libs-3.6.8-1.el7.x86_64 is obsoleted by python3-libs-3.6.8-13.0.1.el7.x86_64 which is already installed
--> Finished Dependency Resolution
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
           Requires: python36 = 3.6.8-1.el7
           Installed: python3-3.6.8-13.0.1.el7.x86_64 (@ol7_latest)
               python36 = 3.6.8-13.0.1.el7
           Available: python3-3.6.8-10.0.1.el7.x86_64 (ol7_latest)
               python36 = 3.6.8-10.0.1.el7
           Available: python36-3.6.3-7.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.3-7.el7
           Available: python36-3.6.6-1.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.6-1.el7
           Available: python36-3.6.6-2.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.6-2.el7
           Available: python36-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.8-1.el7
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
           Requires: python36-libs(x86-64) = 3.6.8-1.el7
           Installed: python3-libs-3.6.8-13.0.1.el7.x86_64 (@ol7_latest)
               python36-libs(x86-64) = 3.6.8-13.0.1.el7
           Available: python3-libs-3.6.8-10.0.1.el7.x86_64 (ol7_latest)
               python36-libs(x86-64) = 3.6.8-10.0.1.el7
           Available: python36-libs-3.6.3-7.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.3-7.el7
           Available: python36-libs-3.6.6-1.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.6-1.el7
           Available: python36-libs-3.6.6-2.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.6-2.el7
           Available: python36-libs-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.8-1.el7

Solution

  • Have a look at the Dockerfiles in the oracle/docker-images/OracleLinuxDevelopers repository.

    There are 2 examples: