Slackbot
05/15/2023, 1:19 PMAshish Singh
05/15/2023, 1:44 PM<http://docker.io|docker.io>
?
• If thats the case, then bentofile
has an option to use custom image as such https://docs.bentoml.org/en/latest/guides/containerization.html#custom-base-image
docker:
base_image: "my_custom_image:latest"
setup_script: "./setup.sh"
Vivien Robert
05/15/2023, 1:48 PMpublic.ecr.aws/docker/library
instead of <http://docker.io/library|docker.io/library>
.
One workaround would be to basically rewrite/copy the code that determines which image to use and add public.ecr.aws/docker/library
then give it as a base_image but I'd rather not maintain that if it can be avoided.Jiang
05/16/2023, 2:29 AMbentoml containerize
?
It will just call the installed docker
to build images, thus you can just change the default registry-mirrors of your docker.
Below is the how-to generated by ChatGPT:
You can configure Docker to use the public.ecr.aws/docker prefix instead of docker.io as the default image registry by following these steps:
1. Open the Docker daemon configuration file by running sudo nano /etc/docker/daemon.json
in your terminal.
2. Add the following lines to the file:
复制代码
{
"registry-mirrors": ["<https://public.ecr.aws>"],
"insecure-registries": [],
"debug": true,
"experimental": true
}
1. Save and exit the file.
2. Restart the Docker daemon by running sudo systemctl restart docker
.
After completing these steps, Docker should use public.ecr.aws/docker as the default image registry. You can verify this by running docker pull public.ecr.aws/<your-image-name>
and seeing if it successfully pulls the image.