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!