对照表
docker
build
$ docker build -t localhost/python/3.12:latest -f Dockerfile-3.12 /home/user/images/python
- name: Build Python 3.12 image
community.docker.docker_image_build:
name: localhost/python/3.12:latest
path: /home/user/images/python
dockerfile: Dockerfile-3.12
push
$ docker push registry.example.com:5000/repo/image:latest
- name: Push an image
community.docker.docker_image_push:
name: registry.example.com:5000/repo/image
tag: latest
supervisorctl
ansible使用supervisor模块的前提是supervisord已启动
start
> supervisorctl start my_app
- name: Manage the state of program to be in started state
community.general.supervisorctl:
name: my_app
state: started
restart
重启所有进程
> supervisorctl restart all
- name: Restart all programs and program groups
community.general.supervisorctl:
name: all
state: restarted