How to stop docker under Linux
The output of ps aux
looks like you did not start docker through systemd/systemctl.
It looks like you started it with:
sudo dockerd -H gridsim1103:2376
When you try to stop it with systemctl, nothing should happen as the resulting dockerd process is not controlled by systemd. So the behavior you see is expected.
The correct way to start docker is to use systemd/systemctl:
systemctl enable dockersystemctl start docker
After this, docker should start on system start.
EDIT: As you already have the docker process running, simply kill it by pressing CTRL+C on the terminal you started it. Or send a kill signal to the process.
First I stop the docker by the following command:
sudo systemctl stop docker
Then I get the message :Warning: Stopping docker.service, but it can still be activated by: docker.socket
.So, I stop the socket as well :
sudo systemctl stop docker.socket
Note: you can start and stop only the docker.socket
when it triggers by it.