autoheal的docker镜像「autoheal.tar」下载链接:https://pan.quark.cn/s/47684b60bb8f
一、导入镜像
docker load -i autoheal.tar
二、查看镜像
docker images
三、运行容器
方式1、直接运行
docker run -d --name autoheal --restart=always -e AUTOHEAL_CONTAINER_LABEL=all -v /var/run/docker.sock:/var/run/docker.sock willfarrell/autoheal
方式2、docker-compose运行
services:
autoheal:
image: willfarrell/autoheal:latest
container_name: autoheal
restart: always
network_mode: none
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
environment:
AUTOHEAL_CONTAINER_LABEL: autoheal-app
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock