You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,14 @@ cd matlab-dockerfile
26
26
### Build & Run Docker Image
27
27
```bash
28
28
# Build container with a name and tag of your choice.
29
-
docker build -t matlab:r2022a.
29
+
docker build -t matlab:r2022b.
30
30
31
31
# Run the container.
32
-
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022a -batch "disp('Hello World!')"
32
+
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022b -batch "disp('Hello World!')"
33
33
```
34
34
For more information on running, see the section on [Run the Container](#run-the-container).
35
35
36
-
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2022a.
36
+
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2022b.
37
37
38
38
## Customize the Image
39
39
### Customize Products to Install Using MATLAB Package Manager (mpm)
@@ -61,7 +61,7 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/ma
61
61
62
62
| Argument Name | Default value | Effect |
63
63
|---|---|---|
64
-
|[MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab)|r2022a| The MATLAB release you want to install. Must be lower-case, for example: `r2019b`.|
64
+
|[MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab)|r2022b| The MATLAB release you want to install. Must be lower-case, for example: `r2019b`.|
65
65
|[LICENSE_SERVER](#build-an-image-with-license-server-information)|*unset*| The port and hostname of the machine that is running the Network License Manager, using the `port@hostname` syntax. For Example: `27000@MyServerName`|
66
66
67
67
Use these arguments with the the `docker build` command to customize your image.
1. Place the `network.lic` file in the same folder as the Dockerfile.
@@ -123,41 +123,41 @@ With the `docker build` command, either:
123
123
124
124
```bash
125
125
# Example
126
-
docker build -t matlab:r2022a.
126
+
docker build -t matlab:r2022b.
127
127
```
128
128
129
129
With the `docker run` command, use the `MLM_LICENSE_FILE` environment variable. For example:
130
130
131
131
```bash
132
-
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022a -batch "disp('Hello World!')"
132
+
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022b -batch "disp('Hello World!')"
133
133
```
134
134
135
135
## Run the Container
136
136
If you did not provide the license server information while building the image, then you must provide it when running the container. Set this environment variable `MLM_LICENSE_FILE` using the `-e` flag with the network license manager's location as `port@hostname`.
137
137
138
138
```bash
139
139
# Launch MATLAB, print Hello World!, and exit:
140
-
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022a -batch "disp('Hello World!')"
140
+
docker run --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2022b -batch "disp('Hello World!')"
141
141
```
142
142
143
143
You can run the container **without** specifying `MLM_LICENSE_FILE`, if you provided the license server information when building the image, as shown in the examples below.
144
144
145
145
### Run MATLAB in an Interactive Command Prompt
146
146
To start the container and run MATLAB in an interactive command prompt, execute:
147
147
```bash
148
-
docker run -it --rm matlab:r2022a
148
+
docker run -it --rm matlab:r2022b
149
149
```
150
150
### Run MATLAB in Batch Mode
151
151
To start the container, run a MATLAB command and exit, execute:
152
152
```bash
153
153
# Container runs the command RAND in MATLAB and exits.
154
-
docker run --rm matlab:r2022a -batch rand
154
+
docker run --rm matlab:r2022b -batch rand
155
155
```
156
156
157
157
### Run MATLAB with Startup Options
158
158
To override the default behavior of the container and run MATLAB with any set of arguments, such as `-logfile`, execute:
159
159
```bash
160
-
docker run -it --rm matlab:r2022a -logfile "logfilename.log"
160
+
docker run -it --rm matlab:r2022b -logfile "logfilename.log"
161
161
```
162
162
To learn more, see the documentation: [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html)
163
163
@@ -176,7 +176,7 @@ For some workflows and toolboxes, you must specify dependencies. You must do thi
176
176
* Use the MATLAB Engine API for C and Fortran
177
177
* Use the Polyspace 32-bit tcc compiler
178
178
179
-
The [matlab-deps repository](https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps) repository lists Dockerfiles for various releases and platforms. [Click here to view the Dockerfile for R2022a](https://github.com/mathworks-ref-arch/container-images/blob/master/matlab-deps/r2022a/ubuntu20.04/Dockerfile).
179
+
The [matlab-deps repository](https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps) repository lists Dockerfiles for various releases and platforms. [Click here to view the Dockerfile for R2022b](https://github.com/mathworks-ref-arch/container-images/blob/master/matlab-deps/r2022b/ubuntu20.04/Dockerfile).
180
180
181
181
These Dockerfiles contain commented lines with the libraries that support these additional capabilities. Copy and uncomment these lines into your Dockerfile.
0 commit comments