Azzera filtri
Azzera filtri

When I try to creat FMU, "docker container failed to start" error happened

37 visualizzazioni (ultimi 30 giorni)
Hello, all:
I try to create a FMU for Linux in windows system. but after I have met one error when I try to build. see following:
Failed to set up the docker environment for cross-platform compilation because the container could not be retrieved. If the computer does not have internet access, check documentation for manually downloading the docker container.
docker container failed to start
a few weeks ago, I alread successed creat a FMU for Linux in windows system. but I don't know why this time when I try to build FMU again, one error happened?
can you help me to solve it?
thank you.
  8 Commenti
wen li
wen li il 20 Lug 2024 alle 13:07
Hello,Umar:
this is the error info :
Failed to set up the docker environment for cross-platform compilation because the container could not be retrieved. If the computer does not have internet access, check documentation for manually downloading the docker container.
docker container failed to start
and when I try to pull linux-based image, it told me no access.
C:\Users\bjkjd>docker pull linux-based
Using default tag: latest
Error response from daemon: pull access denied for linux-based, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
do you know why?
Umar
Umar il 20 Lug 2024 alle 16:17

Hi Wen,

Please see my response to your comments below.

Yours first query mentioned, “Failed to set up the docker environment for cross-platform compilation because the container could not be retrieved. If the computer does not have internet access, check documentation for manually downloading the docker container.docker container failed to start”

Utilize Matlab to check internet connectivity by attempting to access a reliable external server. One common approach is to ping a well-known server, such as Google's DNS server (8.8.8.8), to verify connectivity.

% Check internet connectivity by pinging Google's DNS server

[status, result] = system('ping -c 4 8.8.8.8');

if status == 0 disp('Internet connection is active. Docker can access the internet.'); else disp('No internet connection. Docker may have trouble downloading images.'); end

In the code snippet above, I use the system function to execute a ping command to Google's DNS server. The -c 4 flag specifies sending 4 packets for the ping test. If the status variable is 0, it indicates a successful ping, confirming internet connectivity.Save the Matlab script with the internet connectivity check code snippet to a file, for example, check_connectivity.m. Run the script within your Docker environment to verify internet access.Ensure that your Docker environment has internet access configured correctly. Docker containers typically inherit the host machine's network settings. If your host machine can access the internet, Docker containers should also have connectivity by default.

Addressing your second query,” when I try to pull linux-based image, it told me no access.C:\Users\bjkjd>docker pull linux-based Using default tag: latestError response from daemon: pull access denied for linux-based, repository does not exist or may require 'docker login': denied: requested access to the resource is denied”

Log in to Docker using the docker login command. This command prompts you to enter your Docker Hub credentials (username and password). Once you are logged in, you should have the necessary access to pull the image.If the repository exists and you have the necessary permissions but are still facing issues, try specifying the repository tag explicitly. This can help Docker identify the specific image you want to pull.

docker pull repository_name:<tag>

Note: Replace repository_name with the actual name of the Linux-based repository and tag with the specific tag you want to pull (e.g., latest).

Restarting the Docker service or checking network configurations can sometimes resolve connectivity problems.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Containers in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by