필터 지우기
필터 지우기

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

조회 수: 37 (최근 30일)
wen li
wen li 2024년 7월 17일 14:59
편집: Walter Roberson 2024년 7월 20일 20:59
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
wen li
wen li 2024년 7월 20일 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 2024년 7월 20일 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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Containers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by