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: alternates/building-on-matlab-docker-image/README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,8 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/ma
69
69
|---|---|---|
70
70
|[MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab)| R2025b | MATLAB release to install, for example, `R2023b`.|
71
71
|[ADDITIONAL_PRODUCTS](#customize-products-to-install-using-matlab-package-manager-mpm)|`Symbolic_Math_Toolbox Deep_Learning_Toolbox_Model_for_ResNet-50_Network`| Space-separated list of toolboxes and support packages to install. For more details, see [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md).|
72
+
|[FONTS_PACKAGES](#build-an-image-with-modified-fonts-packages)|`fonts-vlgothic ibus-mozc`| Space-separated list of fonts packages to install. |
73
+
|[ADDITIONAL_APT_PACKAGES](#build-an-image-with-additional-ubuntu-apt-packages)|*unset*| Space-separated list of APT packages to install. |
72
74
|[LICENSE_SERVER](#build-an-image-with-license-server-information)|*unset*| Port and hostname of a machine that is running a Network License Manager, using the `port@hostname` syntax, for example, `27000@MyServerName`. To use this build argument, the corresponding lines must be uncommented in the Dockerfile. |
73
75
74
76
Use these arguments with the `docker build` command to customize the image.
@@ -86,6 +88,19 @@ To build an image for MATLAB R2022b with Deep Learning Toolbox and Parallel Comp
For supported releases see [MATLAB Container Image on Docker Hub](https://hub.docker.com/r/mathworks/matlab).
91
+
92
+
### Build an Image with Modified Fonts Packages
93
+
Use the `FONTS_PACKAGES` argument to build an image with a modified set of font packages. By default, it installs font support packages for a single locale (`ja_JP-UTF-8`). To override the default, specify other packages in the argument, for example, `fonts-arphic-gbsn00lp` (for Chinese) and `fonts-unfonts-core` (for Korean).
### Build an Image with Additional Ubuntu APT Packages
99
+
Use the `ADDITIONAL_APT_PACKAGES` argument to build an image with additional Ubuntu APT packages. By default, it installs font support packages for various locales. To override the default, specify other packages in the argument, for example, `vim`.
Run the container, without needing to pass license information.
@@ -106,6 +121,16 @@ The Docker container you build using this Dockerfile inherits run options from i
106
121
See the documentation for the base image, [MATLAB Container Image on Docker Hub](https://hub.docker.com/r/mathworks/matlab) (hosted on Docker Hub) for instructions on how to use the base image features. The features include interacting with MATLAB using a web browser, batch mode, or an interactive command prompt, as well as how to provide license information when running the container.
107
122
Run the commands provided in the instructions using the name of the Docker image that you build using this Dockerfile.
108
123
124
+
#### Set Custom Locale for Container
125
+
126
+
To set a custom locale for the MATLAB Docker container, install the appropriate fonts when building the Docker image. For example, use `fonts-vlgothic` for Japanese. These fonts are installed by default, unless you modify the `ADDITIONAL_APT_PACKAGES` argument.
127
+
128
+
After building the image, when you run the container, use the `-e` flag with the `LANG` environment variable to specify language and character encoding settings.
129
+
130
+
```bash
131
+
docker run -it --rm -e LANG=ja_JP.UTF-8 --shm-size=512M matlab_with_add_ons:R2025b
132
+
```
133
+
109
134
## More MATLAB Docker Resources
110
135
For more resources, see [More MATLAB Docker Resources](https://github.com/mathworks-ref-arch/matlab-dockerfile#more-matlab-docker-resources).
0 commit comments