Docker Base Image not found when using compiler
조회 수: 16 (최근 30일)
이전 댓글 표시
I am using compiler.package.docker function. I am following the Package Standalone Application example. But it is not working and giving me the following error:
Error using compiler.internal.package.docker.generateBaseImage (line 26)
When creating the base image, 'docker build' failed with the following log:
unable to prepare context: path "/tmp/ubuntu/matlabruntime/docker/r2020b/release/update0/baseimage" not found
Error in compiler.internal.package.docker.generateRuntimeImage (line 15)
compiler.internal.package.docker.generateBaseImage
Error in compiler.package.docker (line 123)
compiler.internal.package.docker.generateRuntimeImage(prodnums)
I have checked all prerequisites. I have Docker installed on my machine, I have checked the MATLAB runtime is installed using the compiler.runtime.download function.
Any ideas?
댓글 수: 0
답변 (1개)
BJ Kowalski
2022년 10월 14일
편집: BJ Kowalski
2022년 10월 14일
I encountered this same problem with a new installation of Ubuntu 22.04.1 LTS using R2022a or R2022b.
I performed the same checks as specified by SG. What I believe was missed is that the Docker service was not running.
Most likely, the docker commands were installed but not the service. I used a snap to install Docker.
sudo snap install docker
But that snap does not include the Docker services. Run the following command to verify that Docker services are not available:
sudo systemctl status docker
That will report "Unit docker.service could not be found.". To add the Docker services I followed the instructions from a tutorial on HowtoForge.com titled "How to create Docker Images with a Dockerfile on Ubuntu 20.04 LTS", While this is listed as Ubuntu 20.04 LTS the instructions for the services also apply to 22.04 LTS.
I executed the following commands:
sudo apt update
sudo apt install docker.io
sudo systemctl start docker
sudo enable docker
After enabling the Docker services I was able to successfully build my container.
NOTE: The container will be built with a Ubuntu 20.04 base image.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Containers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!