This command runs a Docker container named "portainer" based on the "portainer/portainer-ce:latest" Docker image.
docker run -d -p 66666:8000 -p 66667:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
1. The "-d" flag
starts the container in the background. The "-p" flag binds two container ports (8000 and 9000) to two host ports (66666 and 66667) respectively, allowing access to the portainer web interface from outside the container.
2. The "--name" flag
sets the name of the container as "portainer". The "--restart" flag ensures that the container is always restarted automatically if it stops or if the Docker daemon is restarted.