To run a Docker container in detached mode, you can use the -d option with the docker run command. Here’s an example:
docker run -d --name my-container nginx
In this command:
-d: Runs the container in detached mode (in the background).--name my-container: Assigns the name "my-container" to the container.nginx: Specifies the image to use (in this case, the Nginx image).
After running this command, the container will start in the background, and you can check its status using docker ps.
