Offline Installation without Copy Data

Hallo,

I’m using a Windows Container (.NET runtime 3.5) as base image. I have got a large offline installer of a program (6 GB) which I would like to install in the container, so I must call the install.exe within the container. At the moment I copy the offline installation directory into the container and ru it:

COPY ./offlineinstallation C:\TEMP\INSTALLER
RUN C:\TEMP\INSTALLER\install.exe

is there any possibility without copying the installer files into the container? I need a volumn during the docker build, but imho it is not possible.
So how can I temporary mount / create a volume for the docker build process, which contains the installer files, but at the end only the resulted installed data should be stored within the container.

Thanks a lot

Hi @flashpixx,

I don’t like much either copying large install files during the build process. :slight_smile:

I would suggest to make it available on an HTTP repository (Your CI/CD server for example) and then on a oneliner download the installer, run it and delete it. Assuming your shell is CMD, it would go with something like this (I didn’t actually try it) :

    RUN powershell -Command \
        wget http://my.offline/installer.exe ; \
        . 'installer.exe' ; \
        Remove-Item installer.exe;

It has the advantage to not keep the installer.exe in the intermediate layer. So, your image will end up 6GB lighter.

Hope it can help you.

Laurent

Thanks for your idea, but in my case it is an offline installation of a program (based on an ISO image), so I don’t have got one file, I have a set of files. At the moment I have extracted the ISO image into a directory and copy the whole directory into my container and after that I run the installer and delete the directory after the installation is finished.