Main Content

Configure Containers

When you start a container using the docker run command, you can configure its run time behavior. To do this, you can set environment variables inside the container by using the -e flag when you run the docker run command. This page describes some of the environment variables that you can use to configure MathWorks® containers.

Configure Desktop Access Password

To change the password to access the desktop in the container via VNC or from a web browser in containers that allow this, you can use the following option:

-e PASSWORD=MyNewPassword

Add this option to the docker run command when deploying the container.

Configure Proxy Settings

If you are using a container inside a network that connects to the internet via a proxy server, you can specify your proxy server address when you run the container. If you are using MATLAB® with online licensing, you need to specify your proxy server to be a be able connect to the MathWorks online licensing servers.

Add these options to the docker run command when deploying the container.

You can specify the proxy server address using any of the following forms:

  • hostname:12345

  • shorthostname:12345

  • http://hostname:12345

  • http://username:password@hostname:12345

  • IPaddress:12345

where hostname is the fully qualified domain name, shorthostname is the relative domain name, and 12345 is the port number.

Network License Manager

If your license is administrated via a network license manager, you can use this license with MathWorks containers. You can point to the location of the license in the docker run command. Add the option:

-e MLM_LICENSE_FILE=27000@MyLicenseServer

Add this option to the docker run command when deploying the container.

For more information, see Configure License for MathWorks Containers.

Further Configuration Options

For advanced users, further configuration of the container deployment is available through additional Docker options. For more information, see the Docker documentation.

Related Topics