1

I am trying to get Roundhouse running from a Docker image where I have some Oracle scripts, but currently when I execute the rh command against my Docker image I get the following error:

A type could not be created from the object you passed. "roundhouse.databases.oracle.OracleDatabase, roundhouse.databases.oracle" resolves to null.

I think this a result of not having the Oracle Client tools configured correctly in my Docker Image(https://github.com/chucknorris/roundhouse/wiki/Oracle).

I have downloaded the rpm files from https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html and I have managed to get the Oracle Client Tools installed but I carry on getting the above error so I assume that this is because I haven't configured the client tools correctly?

Can anyone advise what I am doing wrong?

FROM mcr.microsoft.com/dotnet/core/sdk:2.1

ENV PATH="$PATH:/root/.dotnet/tools"

ADD *.* /

RUN apt-get update && \
      apt-get install sudo
#RUN apk --update add libaio bc net-tools
RUN sudo apt-get install unzip
RUN sudo apt-get install wget
RUN sudo apt-get install alien -y

RUN sudo alien -i oracle-instantclient*-basic-*.rpm
RUN sudo alien -i oracle-instantclient*-devel-*.rpm
RUN sudo alien -i oracle-instantclient*-sqlplus-*.rpm

RUN echo /usr/lib/oracle/19.1/client/lib > /etc/ld.so.conf.d/oracle.conf
RUN sudo ldconfig

RUN dotnet tool install --global dotnet-roundhouse --version 1.2.1

ENTRYPOINT [ "rh"]
user2760821
  • 109
  • 4
  • I would probably start with an official Oracle instant client docker image based on Oracle Linux and I would load after the dot net installation as an rpm. – Mauricio Aug 06 '21 at 14:50

1 Answers1

1

I had the same error when I tried to use the MS repo. This worked for me:

  • Install the oficial oracle instant client container as oracle/instantclient:19. Instruction here.
  • On top of that image build this Dockerfile
  from oracle/instantclient:19
  RUN microdnf install git RUN git clone https://github.com/chucknorris/roundhouse.git 
  RUN microdnf install dotnet-sdk-2.1 
  RUN cd roundhouse && dotnet tool install --global dotnet-roundhouse --version 1.2.1
  ENTRYPOINT [ "rh"]
Mauricio
  • 117
  • 4