来自守护进程的错误响应:无法使用重启策略创建 'AutoRemove' 容器

Error response from daemon: can't create 'AutoRemove' container with restart policy

Error response from daemon: can't create 'AutoRemove' container with restart policy

当我 运行 命令时,这个错误是什么意思:

docker compose run --rm api python3 manage.py migrate

...

 - Network saleor-platform_saleor-backend-tier  Created                                                                                                    1.6s
 - Network saleor-platform_default              Created                                                                                                    2.2s
 - Volume "saleor-platform_saleor-db"           Created                                                                                                    0.3s
 - Volume "saleor-platform_saleor-redis"        Created                                                                                                    0.2s
 - Volume "saleor-platform_saleor-media"        Created                                                                                                    0.4s
 - Container saleor-platform_db_1               Started                                                                                                   42.5s
 - Container saleor-platform_redis_1            Started                                                                                                   46.1s
 - Container saleor-platform_jaeger_1           Started                                                                                                   46.8s
Error response from daemon: can't create 'AutoRemove' container with restart policy

如何解决?

错误已通过 re-运行ning 上一个命令解决:

>docker-compose run --rm api python3 manage.py migrate

不确定为什么 re-运行 解决了错误。有什么想法吗?

我不知道这是 docker 错误或配置错误的环境还是什么,但删除 --rm 修复了此错误。