I want to run the program on a VPS server Ubuntu 18.04. It must be run with Docker with this command:
docker run --rm --name aparser -v $(pwd)/aparser:/app -p 9091:9091 -t aparser/runtime./aparser -foreground
But I get an error:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
Inputting
sudo systemctl status docker.service
I get:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-05-25 09:31:14 UTC; 14min ago
Docs: https://docs.docker.com
Process: 30302 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1 Main PID: 30302 (code=exited, status=1/FAILURE)
May 25 09:31:12 p619677.vps systemd[1]: docker.service: Main process exited,code=exited, status=1/FAILURE
May 25 09:31:12 p619677.vps systemd[1]: docker.service: Failed with result 'exit-code'.
May 25 09:31:12 p619677.vps systemd[1]: Failed to start Docker Application Container Engine.
May 25 09:31:14 p619677.vps systemd[1]: docker.service: Service hold-off time over, scheduling restart.
May 25 09:31:14 p619677.vps systemd[1]: docker.service: Scheduled restart job, restart counter is at 5.
May 25 09:31:14 p619677.vps systemd[1]: Stopped Docker Application Container Engine.
May 25 09:31:14 p619677.vps systemd[1]: docker.service: Start request repeated too quickly.
May 25 09:31:14 p619677.vps systemd[1]: docker.service: Failed with result 'exit-code'.
May 25 09:31:14 p619677.vps systemd[1]: Failed to start Docker Application Container Engine.
lines 1-16/16 (END)
CodePudding user response:
You will run docker daemon before run docker container.
Run command for start docker service
sudo systemctl start docker
After starting docker you can run with your command and sudo if you are not in sudo
sudo docker run --rm --name aparser -v $(pwd)/aparser:/app -p 9091:9091 -t aparser/runtime./aparser -foreground
If systemctl not working for you run
sudo service docker start
CodePudding user response:
This server does not support Docker.