How can I license MATLAB in my Docker container without signing in?

54 views (last 30 days)

I'm using MathWorks's Docker images hosted on Docker Hub, but I'm always prompted to sign in at startup. I'd like to start the container without needing to sign in. How can I do this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Oct 2024
The mathworks/matlab image on Docker Hub is configured by default to prompt for MathWorks Account credentials. This means that you will need to sign in with your MathWorks Account at startup to verify your licensing. There is no way to automate this sign-in process.
If you are using a Campus-Wide or Startup license, it is possible to save your credentials in the container using the MATLAB (Individual) licensing. Please see the following article for more information:
How do I license my Docker container using a Campus-Wide or Startup Individual license?
If you have a network license, you can pass your license server information to MATLAB in the container by virtue of the MLM_LICENSE_FILE environment variable. For example, see the following docker run command:
docker run --rm -it -e MLM_LICENSE_FILE=27000@MyLicenseServer mathworks/matlab:r2024b
Where you must replace 27000@MyLicenseServer with the correct port number and DNS address for your network license manager.
Alternatively, if your system administrator provides you with a license file, you can mount the license file to the container and point MLM_LICENSE_FILE to the license file path in the container. For example:
docker run --rm -it -v /path/to/local/license/file:/licenses/license.lic -e MLM_LICENSE_FILE=/licenses/license.lic mathworks/matlab:r2024b
If a valid license file is provided, the container will run MATLAB in an interactive terminal. For more information on using the network license manager, see Use the Network License Manager⁠.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!