Is it possible to create a Docker container which can be used to run the VB6 IDE? Are there any showstopper issues / incompatibilities?
From what I understand of Docker (maybe not much) it seems like it could be a lightweight method of running the VB6 IDE and compiler, especially compared to virtual machines.
I have two scenarios in mind for this:
Performing builds in a 'clean' environment
Routine software development tasks
There seem to be a number of peculiarities we need to deal with when installing & configuring VB6 on a new machine, and so bundling all that up into a container could save lots of time and avoid some pitfalls.
It seems a key attribute of the Docker configuration would be to setup the environment with specific registered COM DLLs, etc., and maybe other details like regular files and so on. I have the impression you can accumulate these kinds of things in a Docker environment based on some kind of layering of containers. The point of course would be to keep these things OUT of the actual Windows OS configuration.
NB: I have legit / original installation media for VB6 & SP6.
I have seen this project at GitHub but it is for running VB6 under WINE on Linux, which is not what I need. Maybe it could be a useful starting point for building a container on Windows.
For background:
At present I use virtual machines to run the VB6 IDE for performing builds. This functions OK but seems relatively slow and consumes a lot of disk space. It is unsuitable for development use because of these overheads.
Builds are run using Kinook Visual Build Pro, and also include building some .NET assemblies, WISE installers, etc. Ultimately I'd like to get all of that into containers as well.
I have a script that works for local install and Docker install (tested in windows:1903 container). It requires vb6 enterprise iso files from microsoft. It runs a powershell script that does all the file and registry tricks required to make it work. The key part was modifying the .stf file.
Find it on GitHub at https://github.com/gdsestimating/vb6-install-recipe.
The recipe from @rofo was missing lots of steps. I didn't seem to have the same Service Pack files as the he did either. However, the silent install command he gave was a key part of my progress so I couldn't have done it without that.
If you are using Microsoft's VB6 and SP6 iso images (I only found them at through my subscription at https://my.visualstudio.com) then you can use the above repo.
The key thing is that the .stf
file (in VB6 setup folder of the iso) defines everything that must be done to install. It's like an predecessor to .msi
files. More about it can be found here. You can edit them in a text editor and remove some of the groups to exclude components that cause the install to fail on modern machines. The setup takes an .stf
as one of the arguments
The repo includes a custom .stf
that worked for me. It's the original with some stuff stripped out. It may be missing some components other people need though. I'll update the repo with more details on how to edit them as I figure it out better.
We do compile vb6 projects in docker for windows. While having 3 mil loc and 10mil .NET LOC.
You need the full version of windows, since WindowsServerCore does not work yet.
FROM mcr.microsoft.com/windows:1903
%INSTDIR%\setup\acmsetup.exe /K "12345678" /T "%INSTDIR%\setup\VB98PRO.STF" /S "%INSTDIR%\" /n "User Name" /o "Company name" /b 1 /gc %cd%\vb6_install_log.txt /qtn
To install vbsp6, extract VS6sp61.cab (VS6sp62.cab, VS6sp63.cab, VS6sp64.cab must be beside the file). Then you copy the VB98 Dir over the existing VB6 installation.
You will need this installation if you having problems with access violation exceptions.
Building a small project was very easy. Just start with a default project and go on from that point.
this is the difficult part. The most of the time there are no silent installer for old components. You can fix this by register your third party files by yourself. Just use regsvr32 for that porpose.
The full recipe you can find on github:
https://github.com/Ro-Fo/Vb6IdeDocker
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With