compiler.runtime.createInstallerDockerImage() fails
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 :)
0 commentaires
Réponses (1)
Sivsankar
le 5 Mar 2025
Hi @Marcus
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
Voir également
Catégories
En savoir plus sur Containers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!