Docker Community Forums

Share and learn in the Docker community.

Install Oracle Client 11g R2 x86 in windows container

Hi.

I can’t install oracle client 11g R2 x86 in Windows Server 2016 Container using Dockerfile.

I tryed to locate some logs with command: docker logs -f containerID, but didn’t show anything.

This command: C:\Client_Oracle_11gR2_32\client\setup.exe -silent -nowait -responseFile C:\Client_Oracle_11gR2_32\client\client_oracle_11g_r2_x86.rsp
was successfully on Windows Server 2016 and a new container.

P.S. My custom image is created successfully, I’m using the image “microsoft/iis” from dockerhub with dockerfile “powershell” commands to create Virtual Site, AppPool and Site. It’s all right.

My problem is with the Dockerfile.

RUN [“C:\Client_Oracle_11gR2_32\client\setup.exe”, “-silent”, “-nowait”, “-responseFile C:\Client_Oracle_11gR2_32\client\client_oracle_11g_r2_x86.rsp”]

Someone has a suggestion?

Hi,

did you get this problem solved?
I´m facing the same issue and have no clue how to get this working!

Greets
Matthias

I have the same issue here as well!

I am not sure if this is any help but maybe try

“-silent”, “-waitforcompletion”, “-noconsole”,

instead of

“-silent”, “-nowait”,

If you put -nowait then it means that docker will skip this line and go to next one since it does not know that it was completed. You probably shall remove that line at the minimum.
If I were you I would switch to powershell and CMD processor and use similar construct to below to launch installation executable

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]

Start-Process -filepath "<your exe>" -ArgumentList "<your arguments>" -PassThru | Wait-Process

Thanks artisticcheese, I think you are on to something. My problem now is that I am trying to specify an argument for the oracle install for a response file and it doesnt like it…

its like this and I have got this too work outside of the docker file: SYSTEM_DRIVE:\setup.exe_location> setup [-silent] “variable=setting” [-nowelcome] [-noconfig] [-nowait] -responseFile filename

Well remember inside docker file you run it via powershell prompt, so try the correct syntax inside powershell processor via Start-Process instead of cmd.exe

Could you please post the Dockerfile if you got it to work? Thanks!

I have been struggling with this for a couple of days

Oracle setup installer and response files ready, I run the setup command with my response file on my own PC from an elevated cmd window and Oracle is installed, no problems found and oracledb installs according to my reponsefile

CMD command
setup -silent -responsefile d:\temp\database\response\db.rsp -skipPrereqs -noconfig -waitForCompletion

But even with silent switch the Oracle Universal Installer and some configuration still popup, that will not work when installing from an image or within a container itself
(see picture attached)

When try to replicate using my dockerfile or an error or nothing happens

Docker file
#Sample Dockerfile

#Indicates that the windowsservercore image will be used as the base image.
FROM microsoft/windowsservercore

#Create the working folder
RUN mkdir c:\temp\database

#Copy Oracle installers and response file to the working directory previously created
COPY database /temp/database

#Run the command
RUN Powershell.exe Start-Process -FilePath ‘C:\temp\database\setup.exe’ -argumentlist ‘-responsefile c:\temp\database\response\db.rsp’, ‘silent’ -wait

Once ready I run on an elevated powershell Window

PS D:\docker\dockerfiles> docker image build -t 2016oracle -f dockerfile .

As I said even that the build might finish successfully and without errors the application it is not installed or the container run for a moment and then exits few seconds later

I have a very similar problem installing Oracle SQLPlus and VS Redistributable on a container on MS Server 2016. Looks like it is a dead end for those who are trying to (a) Get a reasonable installation of any non-Microsoft software installed on the container (b) Run/Switch-to Linux containers on Windows 2016.

I don’t see how this shall be called a fault of windows containers where it’s issue with installation for Oracle client which can not be run in silent mode.

Hi artisticchese,

That it is not entirely true, you can create an answer file and start a total silent install, is well documented in Oracle and I managed to start the install on the container, but fails after few seconds with access denied, even that the
account is created on my docker file and member of the local admin group

It’ is something of the Windows Core image and its structure

What account was created and where is log showing access denied? I read thread again and don’t see any mentions of additional accounts and access denied error messages.

I have not updated the thread because basically I gave up with the test.

I will try to upload my new docker file and the logs, including the latest install command which avoid Oracle Universal Installer showing

But as I said still not working

Did you manage to solved it? I´m also trying to install the oracle client using the mcr.microsoft.com/windows/servercore/iis image.

I managed to dockerise the Oracle Client on Windows containers by using the following Dockerfile

FROM mcr.microsoft.com/windows/servercore:ltsc2019

SHELL ["PowerShell", "-Command"]

WORKDIR c:/oracle/setup

COPY setup/ODAC112030_x64.zip .

RUN Expand-Archive ODAC112030_x64.zip -DestinationPath ODAC112030_x64; \
	Remove-Item -Force ODAC112030_x64.zip;

COPY setup/responsefile.rsp .

RUN Start-Process c:\oracle\setup\ODAC112030_x64\setup.exe \
	-ArgumentList '-silent', '-nowait', '-waitforcompletion', '-responseFile', 'c:\oracle\setup\responsefile.rsp' \
	-NoNewWindow -Wait

COPY setup/tnsnames.ora C:/oracle/

RUN setx /M TNS_ADMIN 'C:/oracle'

What you need

  • ODAC112030_x64.zip - Oracle Client installation file
  • responsefile.rsp - response file for silent Oracle Client installation
  • tnsnames.ora - your tnsnames.ora configuration file

How to test it

  • PowerShell command: (New-Object system.data.oledb.oledbenumerator).GetElements() | where SOURCES_NAME -EQ "OraOLEDB.Oracle"
  • PowerShell script:
$conn = New-Object System.Data.OleDb.OleDbConnection
$conn.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=YOURDB;Persist Security Info=True;User ID=xxx;Password=yyy;Unicode=True"
$conn.Open()
echo $conn.GetSchema("Tables").Rows[0]
$conn.Close()
  • SQLPlus sqlplus xxx/yyy@YOURDB