I have tried your exact copy of the Dockerfile in the repo to build locally and then run in VNC mode I get this error,
I also tried a modified version of your Dockerfile to just get the toolboxes I need from MPM as well and same error.
# Copyright 2019 - 2024 The MathWorks, Inc.
# To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lower case to specify the release, for example: ARG MATLAB_RELEASE=r2023a
ARG MATLAB_RELEASE=r2024a
# When you start the build stage, this Dockerfile by default uses the Ubuntu-based matlab-deps image.
# To check the available matlab-deps images, see: https://hub.docker.com/r/mathworks/matlab-deps
FROM mathworks/matlab-deps:${MATLAB_RELEASE}
ARG MATLAB_RELEASE
# Install mpm dependencies
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install --no-install-recommends --yes \
curl \
wget \
unzip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Add "matlab" user and grant sudo permission.
RUN adduser --shell /bin/bash --disabled-password --gecos "" matlab \
&& echo "matlab ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/matlab \
&& chmod 0440 /etc/sudoers.d/matlab
# Set user and work directory.
USER matlab
WORKDIR /home/matlab
# Run mpm to install MATLAB in the target location and delete the mpm installation afterwards.
# If mpm fails to install successfully then output the logfile to the terminal, otherwise cleanup.
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
&& chmod +x mpm \
&& sudo HOME=${HOME} ./mpm install \
--release=${MATLAB_RELEASE} \
--destination=/opt/matlab/${MATLAB_RELEASE}/ \
--doc \
--products \
AUTOSAR_Blockset \
Embedded_Coder \
Fixed-Point_Designer \
MATLAB_Coder \
Simulink \
Simulink_Coder \
Stateflow \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -rf mpm /tmp/mathworks_root.log ${HOME}/.MathWorks \
&& sudo ln -s /opt/matlab/${MATLAB_RELEASE}/bin/matlab /usr/local/bin/matlab
RUN ls -l /usr/local/bin/matlab
ENTRYPOINT ["matlab"]
CMD [""]
I also did a GitHub Actions run to build this Dockerfile to eliminate if it is a building issue on my laptop but this also has the same error when pulling down and running.
However, if I pull your image down and run in VNC, it works great. I have also tried the official image like mathworks/matlab:r2024a and mathworks/matlab:r2021b and they also work fine in VNC mode.
I have tried your exact copy of the Dockerfile in the repo to build locally and then run in VNC mode I get this error,
I also tried a modified version of your Dockerfile to just get the toolboxes I need from MPM as well and same error.
I also did a GitHub Actions run to build this Dockerfile to eliminate if it is a building issue on my laptop but this also has the same error when pulling down and running.
However, if I pull your image down and run in VNC, it works great. I have also tried the official image like mathworks/matlab:r2024a and mathworks/matlab:r2021b and they also work fine in VNC mode.