Docker with a Floating License

Coreform Cubit Version: 2024.3
Platform: Ubuntu 20.04 (Docker)

Issue
Hi all, I’m trying to figure out how to access a Cubit floating license from within Docker for the case where the Docker container is running on the same remote as where the license server is.

I’ve created a Docker image which installs Coreform Cubit along with a bunch of other Python related dependencies. We have a floating license for Coreform Cubit which I want the resulting Docker container to be able to ping so that I can run Cubit commands from within the container.

I’ve set up the Cubit installation in the Docker image such that it adds

HOST host.docker.internal ANY 5053
ISV csimsoft

to the /home/USERNAME/Coreform-Cubit-2024.3/bin/licenses/remote.lic file (similar to what’s discussed in this thread).

For the sake of an example, let’s say I have the two machines: mylaptop and myserver. The RLM server for the Cubit license is running on myserver.

The following scenario currently works:

  • Open an SSH tunnel from mylaptopmyserver using something along the lines of ssh -N -L 5053:localhost:5053 myserver
  • Spin up the Docker container on mylaptop
  • Running Cubit commands works :slight_smile:

The following, however, does not:

  • SSH into myserver
  • Spin up the same Docker container on myserver
  • Running Cubit commands does not work :frowning:

When I try running a Cubit command with the above setup, I get the error:

License Error: No license found
To activate Coreform Cubit for the first time, contact sales@coreform.com with your hostid: ...
Coreform Cubit will quit.
ERROR: A valid license was not found.

I’m thinking that I may need to modify something in the remote.lic to get this working. Does anyone have any ideas?

Cheers,
Pat

This is down to how you have docker networking set up on your host machine. By default docker containers don’t port forward and don’t have any connections to the host network. If you run the container with --network=host it’ll use the same network as the server it’s running on and I think it’ll work.

Hi @scot,

Thanks a lot for your reply :slightly_smiling_face:

I gave this a shot with --network=host but unfortunately got the same behaviour as before. I also tried this with --add-host host.docker.internal=host-gateway but got the same error when trying to run Cubit.

I’m wondering if maybe this is a permissions issue though as I’m required to run Docker in rootless mode on myserver. The reason for running this on this remote server to begin with is that I’m trying to set up a CI/CD pipeline using a Dockerized GitLab runner.

Let me know in case you have any other ideas or if there are any additional details I can provide.

Thanks again for your help! :smile:

Cheers,
Pat

It kind of sounds like you’ve got something like a macvtap set up with the docker network, which allows access to other machines from the virtual network, but not the host machine.

Hi @scot,

Thanks for your reply. I’m honestly not sure — I’m not familiar with macvtap. I’ll do some more poking around to see if we can nail down exactly where the issue is coming from.

I think seeing if we can get this to run on a rootful version of Docker (while not being a viable option for use within a CI/CD pipeline) might be a good way to try and narrow down where the issue is coming from. I’ll let you know how things develop.

Thanks again for your help :slight_smile:

All the best,
Pat