How do I license my Docker container using a Campus-Wide or Startup Individual license?

How do I license my Docker container using a Campus-Wide or Startup Individual license?

 Accepted Answer

Please note this will only work with containers running R2023b or newer. This workflow should work with any of our MATLAB Docker Hub images or Dockerfile reference architectures (excluding the non-interactive alternate). Containers running older releases can use the Individual license with only the mathworks/matlab image hosted on Docker Hub. 
First, run the container using the following docker run command:
docker run --rm -it <image_name> matlab -licmode onlinelicensing
When the container runs, it will ask you for your MathWorks Account login information. You may additionally be prompted to select a license. Once you've signed in with your MathWorks Account and MATLAB is ready for a command, open a new terminal window. In this new terminal, run the following docker commit command to save the changes to the container:
docker commit <container_id> <new_image_name>
This will save the container as a new image named <new_image_name> with the MATLAB (Individual) licensing enabled. The container id can be obtained by running docker ps. 
When you run this new container, you will not be requested to log in, and MATLAB will just launch. Note that we have committed the entrypoint changes to the container as well, so MATLAB will always launch with the -licmode onlinelicensing parameter unless specified otherwise in the docker run command. If you need to modify the entrypoint, ensure MATLAB is launched with the -licmode onlinelicensing parameter to ensure the MATLAB (Individual) licensing is used. 

More Answers (0)

Categories

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!