skip to Main Content

I noticed the Lazarus IDE and VSCode can be put into Docker Containers as devcontainers, so that you can develop and compile software inside that container. I have no experience with Docker, and I cannot seem to find any data on the internet on how to install/place the RAD Studio IDE into a container. So, I was hoping that someone here on SO could assist?

Is it indeed possible to install/setup the RAD Studio (not RAD Server) IDE into a container?

2

Answers


  1. Docker runs on Linux kernel. Windows version of docker is based on WSL2, basically a VM with Linux. In order to run windows application inside docker container, it should contain a full blown VM with Windows. If you will try to run such container in Windows, you will basically run your app in Windows VM that runs in Linux VM, that runs on Windows. Such solution will be very slow and bugprone.

    If you want to run RAD Studio on a computer where you do not have rights to install it, the best option will be to setup a VM with RAD Studio in the cloud (like MS Azure, Amazon AWS) or on your home hardware. Than connect to it via some sort of VPN and use Remote Desktop Connection. On a good internet, experience will be close to running VM localy.

    Login or Signup to reply.
  2. It is possible and you may find some unofficial docker images on hub.docker.com. Basically, you need to put your IDE files and configs into a windows container:

    FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022
    SHELL ["powershell"]
    ...
    

    And set all necessary environment variables:

        [System.Environment]::SetEnvironmentVariable('BDS', 'C:Program Files (x86)EmbarcaderoStudio21.0', [System.EnvironmentVariableTarget]::Machine); 
        $bdsBin = 'C:Program Files (x86)EmbarcaderoStudio21.0bin'; 
        $bdsBin64 = 'C:Program Files (x86)EmbarcaderoStudio21.0bin64'; 
        [System.Environment]::SetEnvironmentVariable('BDSBIN', $bdsBin, [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('BDSCOMMONDIR', 'C:UsersPublicDocumentsEmbarcaderoStudio21.0', [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('BDSINCLUDE', 'C:Program Files (x86)EmbarcaderoStudio21.0include', [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('BDSLIB', 'C:Program Files (x86)EmbarcaderoStudio21.0lib', [System.EnvironmentVariableTarget]::Machine); 
        $frameworkDir = 'C:WindowsMicrosoft.NETFrameworkv4.0.30319'; 
        [System.Environment]::SetEnvironmentVariable('FrameworkDir', $frameworkDir, [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('FrameworkVersion', 'v4.5', [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('LANGDIR', 'EN', [System.EnvironmentVariableTarget]::Machine); 
        [System.Environment]::SetEnvironmentVariable('Path', ([System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ';' + $frameworkDir + ';' + $bdsBin + ';' + $bdsBin64), [System.EnvironmentVariableTarget]::Machine); 
        $env:Path = [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ';' + [System.Environment]::GetEnvironmentVariable('Path','User');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search