Home > database >  Containerizing executables in Java
Containerizing executables in Java

Time:09-10

I have a CEF (Chromium Embedded Framework) application I am controlling with Selenium. Normally the application does not allow multiple instances of it to be running at the same time since it modifies directly its root files. I need to be able to run multiple instances (controlled by Selenium) though and some kind of containerization is therefore needed, correct? I've been looking into Docker containers, but as far as I understand, it doesn't really suit my needs as I need to be able to control the Selenium instances (or maybe other executables later on).

So, what should I do? Here's what I need:

  • isolate processes
  • the processes need to exist in some kind of virtual filesystem?
  • probably be able to implement virtual network adapters
  • be able to interact with the containerized process
  • implemented in Java

How can I proceed?

CodePudding user response:

Yes, you can run your apps in docker, and run either selenium inside them independently ( so you have 1-1 relationship ) use Selenium Remote Webdriver and treat each docker instance as a remote machine (1 - many).

I don't think I can give you a concrete example because I have no idea what your application looks like nor it would be feasible to have it here, but these are basically the parts you are looking for:

  • Run an app with docker
  • Expose the apps to the host machine (your machine, where these dockers run)
  • Use Selenium RemoteWebDriver to reach each one of the instances.
  • Related