Learn the benefits of running one-off, short-lived Docker containers. Short-Lived containers are useful to execute one-line commands or setup scheduled tasks. We‘ll demonstrate setting up a cronjob from the host machine to tap into the benefits of running automated, timed scripts with Docker.
docker --rm ngnix ngnix -h // run short live ngnix container with command ngnix -h
This command will run ngnix container a short time, and exist after running.
时间: 2024-11-08 02:04:33