compiler.r​untime.cre​ateInstall​erDockerIm​age() fails

13 vues (au cours des 30 derniers jours)
Marcus
Marcus le 28 Fév 2025
Commenté : Marcus le 7 Mar 2025
Hi all,
I am trying to build a docker container from a production server package but I am already stuck at installing the Installer Docker Image.
I am using Matlab R2022b Update 10 and WSL2 running Ubuntu 22.04.2 LTS.
I can successfully build my Production Server Archive through
compiler.build.productionServerArchive()
But when trying to pack it into a docker container using
compiler.package.microserviceDockerImage()
Matlabs attempts to Pull Runtime Installer Image fails:
==> Generate Microservice Docker Image...
> In compiler.internal.package.docker/MicroserviceImageBuilder/additionalValidation (line 32)
In compiler.internal.package.docker/ApplicationBuilder (line 21)
In compiler.internal.package.docker.MicroserviceImageBuilder
In compiler.package.microserviceDockerImage (line 136)
In microserviceDemoServiceBuildProductionServerPackageAndDocker (line 57)
In run (line 91)
Attempting To Pull Runtime Installer Image
r2022b-update-10: Pulling from matlab-runtime-utils/matlab-runtime-installer
560c024910be: Pulling fs layer
b224fc184bca: Pulling fs layer
5ebc020cb271: Pulling fs layer
b224fc184bca: Downloading
560c024910be: Downloading
560c024910be: Retrying in 5 seconds
5ebc020cb271: Retrying in 5 seconds
error pulling image configuration: download failed after attempts=2: denied: requested access to the resource is denied
Runtime Installer Image Pull Failed
Checking If Runtime Installer Image Already Exists
Generating Runtime Installer Image
Error using compiler.internal.package.docker.generateRuntimeInstallerImage
Unable to find or create Runtime installer image. Run "compiler.runtime.createInstallerDockerImage".
Error in compiler.internal.package.docker.generateRuntimeImage (line 17)
installerImageName = compiler.internal.package.docker.generateRuntimeInstallerImage;
Error in compiler.internal.package.docker.ApplicationBuilder/generateApplicationImage (line 91)
runtimeImageName = compiler.internal.package.docker.generateRuntimeImage(prodnums);
Error in compiler.internal.package.docker.ApplicationBuilder/build (line 54)
obj.generateApplicationImage
Error in compiler.package.microserviceDockerImage (line 137)
microbldr.build
Error in microserviceDemoServiceBuildProductionServerPackageAndDocker (line 57)
compiler.package.microserviceDockerImage(prodServerArchive, ...
Error in run (line 91)
evalin('caller', strcat(script, ';'));
Error using microserviceDemoServiceBuildProductionServerPackageAndDocker
Unable to find or create Runtime installer image. Run "compiler.runtime.createInstallerDockerImage".
Error in run (line 91)
evalin('caller', strcat(script, ';'));
So I downloaded the linux image manually and passed it to make an offline installation using
compiler.runtime.createInstallerDockerImage('MATLAB_Runtime_R2022b_Update_10_glnxa64.zip')
but this also fails
Attempting To Pull Runtime Installer Image
Error response from daemon: pull access denied for containers.mathworks.com/matlab-runtime-utils/matlab-runtime-installer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Runtime Installer Image Pull Failed
Checking If Runtime Installer Image Already Exists
Generating Runtime Installer Image
Generating Base Runtime Image
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile.base
#1 transferring dockerfile: 1.59kB 0.0s done
#1 DONE 0.1s
#2 [internal] load metadata for docker.io/library/ubuntu:20.04
#2 ERROR: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on 10.58.194.16:53: no such host
------
> [internal] load metadata for docker.io/library/ubuntu:20.04:
------
Dockerfile.base:1
--------------------
1 | >>> FROM ubuntu:20.04
2 |
3 | ENV DEBIAN_FRONTEND="noninteractive"
--------------------
ERROR: failed to solve: ubuntu:20.04: failed to resolve source metadata for docker.io/library/ubuntu:20.04: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on 10.58.194.16:53: no such host
Error using compiler.internal.package.docker.DockerCommandRunner/runCommand
The docker command:
wsl docker build -f "/mnt/c/Users/x/AppData/Local/Temp/tpcbd33e55_f1a2_4b39_bba7_789aedcd1836/Dockerfile.base" -t
matlabruntimebase/r2022b/release/update10 "/mnt/c/Users/x/AppData/Local/Temp/tpcbd33e55_f1a2_4b39_bba7_789aedcd1836"
failed with the following log:
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile.base
#1 transferring dockerfile: 1.59kB 0.0s done
#1 DONE 0.1s
#2 [internal] load metadata for docker.io/library/ubuntu:20.04
#2 ERROR: failed to authorize: failed to fetch anonymous token: Get
"https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on 10.58.194.16:53: no
such host
------
> [internal] load metadata for docker.io/library/ubuntu:20.04:
------
Dockerfile.base:1
--------------------
1 | >>> FROM ubuntu:20.04
2 |
3 | ENV DEBIAN_FRONTEND="noninteractive"
--------------------
ERROR: failed to solve: ubuntu:20.04: failed to resolve source metadata for docker.io/library/ubuntu:20.04: failed to authorize: failed to fetch anonymous
token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on
10.58.194.16:53: no such host
Error in compiler.internal.package.docker.ImageBuilder/build (line 95)
obj.DockerCommandRunner.runCommand(buildcmd, 'EchoOutput', true);
Error in compiler.internal.package.docker.generateBaseImage (line 45)
bldr.build(baseImageName)
Error in compiler.internal.package.docker.generateRuntimeInstallerImage (line 63)
baseImageName = compiler.internal.package.docker.generateBaseImage;
Error in compiler.runtime.createInstallerDockerImage (line 66)
compiler.internal.package.docker.generateRuntimeInstallerImage(installer)
I am puzzled why the installation process claims a no such host error. I can access the internet from Matlab and WSL (through a company proxy though) but I cannot reproduce the error from the installation attempt above
In Matlab:
>> urlread("https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io")
ans = '{"token":"eyJ...bNw","expires_in":300,"issued_at":"2025-02-28T17:01:16.420950029Z"}
In WSL2:
$ wget -O - https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io {"token":"eyJ...4qg","expires_in":300,"issued_at":"2025-02-28T16:59:00.268111024Z"}
I am a little bit stuck right now :/
Any hints would be appreciated :)

Réponses (1)

Sivsankar
Sivsankar le 5 Mar 2025
Try running this command before pulling the "containers.mathworks.com/matlab-runtime:r2022b" image.
>> docker login containers.mathworks.com
It is required to login to MathWorks before obtaining the image. Maybe this might give you access to pull Runtime installed image
Thanks
  1 commentaire
Marcus
Marcus le 7 Mar 2025
I tried, but unfortunately it does not work.
I now also removed the proxy in between so that I have a direct internet connection, but that does not help either:
Still hello-world works:
$ docker image pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
Digest: sha256:bfbb0cc14f13f9ed1ae86abc2b9f11181dc50d779807ed3a3c5e55a6936dbdd5
Status: Image is up to date for hello-world:latest
docker.io/library/hello-world:latest
$ docker rmi 74cc54e27dc4
$ docker image pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete
Digest: sha256:bfbb0cc14f13f9ed1ae86abc2b9f11181dc50d779807ed3a3c5e55a6936dbdd5
Status: Downloaded newer image for hello-world:latest
docker.io/library/hello-world:latest
However when attempting to pull from mathworks I eget a whole bunch of different errors more or less randomly...
$ docker image pull containers.mathworks.com/matlab-runtime:r2022b
Error response from daemon: Head "https://containers.mathworks.com/v2/matlab-runtime/manifests/r2022b": dial tcp: lookup containers.mathworks.com: i/o timeout
$ docker image pull containers.mathworks.com/matlab-runtime:r2022b
Error response from daemon: Head "https://containers.mathworks.com/v2/matlab-runtime/manifests/r2022b": Get "https://containers-auth.mathworks.com/auth?account=my%40email&scope=repository%3Amatlab-runtime%3Apull&service=mathworksdockerregistry": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
$ docker image pull containers.mathworks.com/matlab-runtime:r2022b
Error response from daemon: pull access denied for containers.mathworks.com/matlab-runtime, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
though I am already logged in (still that does not always work either?!...)
$ docker login containers.mathworks.com
Info → To login with a different account, run 'docker logout' followed by 'docker login'
Login did not succeed, error: Error response from daemon: Get "https://containers.mathworks.com/v2/": Get "https://containers-auth.mathworks.com/auth?account=my%40email&client_id=docker&offline_token=true&service=mathworksdockerregistry": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Username (my@email):
Info → A Personal Access Token (PAT) can be used instead.
To create a PAT, visit https://app.docker.com/settings
$ docker login containers.mathworks.com
Authenticating with existing credentials... [Username: my@email]
i Info → To login with a different account, run 'docker logout' followed by 'docker login'
Login Succeeded
but also login does not make any difference...
$ docker image pull containers.mathworks.com/matlab-runtime:r2022b
Error response from daemon: Head "https://containers.mathworks.com/v2/matlab-runtime/manifests/r2022b": Get "https://containers-auth.mathworks.com/auth?account=my%40email&scope=repository%3Amatlab-runtime%3Apull&service=mathworksdockerregistry": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
$ docker image pull containers.mathworks.com/matlab-runtime:r2022b
Error response from daemon: pull access denied for containers.mathworks.com/matlab-runtime, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Containers dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by