Docker compose command fails as root user - linux

I'm having a hard time figuring out what's wrong.
when I run docker-compose -f ./docker-compose.yml build parallel I get this output, saying that docker isn't running (which isn't true, see below)
joel#ogofe:/home/dev/udagram$ docker-compose -f ./docker-compose.yml build parallel
/home/joel/.local/lib/python3.9/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.6) doesn't match a supported version!
warnings.warn(
ERROR: Couldn't connect to Docker daemon at http://172.17.0.0:2375 - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
I've checked the status of the docker service, and it's up and running. I even tried restarting it to no avail.
Also worth knowing: I've scoured Stack Overflow for a fix, but haven't found one yet. I did get a nudge in the right direction (I hope) suggesting that it's a permission issue (ie docker-compose can't see the running service because it was started by the root user)
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-09-01 06:36:18 WAT; 2h 45min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 15087 (dockerd)
Tasks: 159
Memory: 34.2M
CPU: 5.999s
CGroup: /system.slice/docker.service
└─15087 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Sep 01 06:35:46 ogofe dockerd[15087]: time="2022-09-01T06:35:46.555705337+01:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/cont>
Sep 01 06:35:46 ogofe dockerd[15087]: time="2022-09-01T06:35:46.555733870+01:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Sep 01 06:35:49 ogofe dockerd[15087]: time="2022-09-01T06:35:49.830692206+01:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Sep 01 06:36:07 ogofe dockerd[15087]: time="2022-09-01T06:36:07.519863155+01:00" level=info msg="Loading containers: start."
Sep 01 06:36:15 ogofe dockerd[15087]: time="2022-09-01T06:36:15.201916110+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. >
Sep 01 06:36:15 ogofe dockerd[15087]: time="2022-09-01T06:36:15.796809326+01:00" level=info msg="Loading containers: done."
Sep 01 06:36:17 ogofe dockerd[15087]: time="2022-09-01T06:36:17.811988794+01:00" level=info msg="Docker daemon" commit=363e9a8 graphdriver(s)=overlay2 version=20.10.5
Sep 01 06:36:18 ogofe dockerd[15087]: time="2022-09-01T06:36:18.465597339+01:00" level=info msg="Daemon has completed initialization"
Sep 01 06:36:18 ogofe systemd[1]: Started Docker Application Container Engine.
Sep 01 06:36:18 ogofe dockerd[15087]: time="2022-09-01T06:36:18.893028725+01:00" level=info msg="API listen on /run/docker.sock"
However, running sudo docker-compose ... doesn't seem to work either, and I'm greeted with a new error. I am at a loss here, and I'm running out of time to submit this project.
joel#ogofe:/home/dev/udagram$ sudo docker-compose -f ./docker-compose.yml build parallel
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 5, in <module>
from compose.cli.main import main
ModuleNotFoundError: No module named 'compose'
I know my writing could use a lot of work, but I hope this is at least clear enough for someone to understand my challenge.
Thank You for the help. Cheers!
PS: I'm running on a Kali Linux distro, and I have docker-desktop installed.

I was able to get it working.
First I had to reinstall docker-compose by running curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
I noticed that running sudo docker-compose was the wrong format of the command, instead I used sudo docker compose -f ./docker-compose-build.yml build --parallel and it worked fine.
Thanks #DavidMaze for your help.

Related

Docker service hosts config failed to start

I have Debian 10 virtual machine.
And I want to be able to connect to the docker API from another host.
I can connect to docker from other host if I start docker deamon from console
dockerd -H unix:///var/run/docker.sock -H tcp://192.168.3.157
If I try to configure /etc/docker/daemon.json like
{
"hosts": ["unix:///var/run/docker.sock", "tcp://192.168.3.157"]
}
The command systemctl start docker fails. The command systemctl status docker have next output
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-11-02 11:32:26 MSK; 1min 10s ago
Docs: https://docs.docker.com
Process: 868 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 868 (code=exited, status=1/FAILURE)
Nov 02 11:32:24 debian-for-docker systemd[1]: Failed to start Docker Application Container Engine.
Nov 02 11:32:26 debian-for-docker systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Nov 02 11:32:26 debian-for-docker systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Nov 02 11:32:26 debian-for-docker systemd[1]: Stopped Docker Application Container Engine.
Nov 02 11:32:26 debian-for-docker systemd[1]: docker.service: Start request repeated too quickly.
Nov 02 11:32:26 debian-for-docker systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 02 11:32:26 debian-for-docker systemd[1]: Failed to start Docker Application Container Engine.
Nov 02 11:32:53 debian-for-docker systemd[1]: docker.service: Start request repeated too quickly.
Nov 02 11:32:53 debian-for-docker systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 02 11:32:53 debian-for-docker systemd[1]: Failed to start Docker Application Container Engine.
How should I configure the /etc/docker/daemon.json to make my deamon start properly?
I have found the answer.
It's here Unable to start docker after configuring hosts in daemon.json
I have created the file /etc/systemd/system/docker.service.d/override.conf with content
# Disable flags to dockerd, all settings are done in /etc/docker/daemon.json
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd
And then I restarted the service systemctl daemon-reload; systemctl restart docker

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? for Ubuntu 16.04

Getting the above error while running any docker command.
When i run the following command
$ sudo docker info
Output
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
None of the docker commands are working. All of them throws same error.
$ sudo systemctl status docker
Output.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-override.conf
Active: inactive (dead) (Result: exit-code) since Mon 2018-07-02 09:27:04 EDT; 1min 2s ago
Docs: https://docs.docker.com
Process: 23866 ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --disable-legacy-registry=false <br>(code=exited, status=1/FAILURE)
Main PID: 23866 (code=exited, status=1/FAILURE)
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: docker.service: Start request repeated too quickly.
Jul 02 09:27:04 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
$ sudo systemctl status nvidia-docker
Output
● nvidia-docker.service - NVIDIA Docker plugin
Loaded: loaded (/lib/systemd/system/nvidia-docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-07-02 08:54:55 EDT; 37min ago
Docs: https://github.com/NVIDIA/nvidia-docker/wiki
Main PID: 3173 (nvidia-docker-p)
Tasks: 10
Memory: 61.8M
CPU: 3.739s
CGroup: /system.slice/nvidia-docker.service
└─3173 /usr/bin/nvidia-docker-plugin -s /var/lib/nvidia-docker
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Starting NVIDIA Docker plugin...
Jul 02 08:54:55 cse-bennettuniv systemd[1]: Started NVIDIA Docker plugin.
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA unified memory
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Loading NVIDIA management library
Jul 02 08:54:55 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:55 Discovering GPU devices
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Provisioning volumes at /var/lib/nvidia-docker/volumes
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving plugin API at /var/lib/nvidia-docker
Jul 02 08:54:59 cse-bennettuniv nvidia-docker-plugin[3173]: /usr/bin/nvidia-docker-plugin | 2018/07/02 08:54:59 Serving remote API at localhost:3476
When I run the following comman...
$ sudo service docker restart
Output
Job for docker.service failed because the control process exited with error code. See _"systemctl status docker.service"_ and _"journalctl -xe"_ for details.
I have already run the "systemctl status docker.service" and I also run the "journalctl -xe" command to understand whats the problem. The journalctl output contains
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Starting Docker Application Container Engine...
Jul 03 13:23:06 cse-bennettuniv dockerd[9390]: ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Failed to start Docker Application Container Engine.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Unit entered failed state.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 03 13:23:06 cse-bennettuniv systemd[1]: Stopped Docker Application Container Engine.
A more complete txt file of the outpot thrown by "journalctl -xe" command
Thank you #DavidMaze and #Exa for refining the issue. I googled this particular error ERROR: The '--disable-legacy-registry' flag has been removed. Interacting with legacy (v1) registries is no longer supported . And then I removed it from the file and saved it. After that, it was working fine but there was a new error in nvidia-docker. So my Superior suggested me to reinstall docker and nvidia-docker. I followed this LINK to reinstall things. Everything got installed without any error. But when i tried to start the nvidia-docker, it stared throwing this perticular error: Failed to start nvidia-docker.service: Unit nvidia-docker.service not found. Following are the details.
sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-override.conf
Active: active (running) since Thu 2018-07-05 14:49:50 EDT; 23s ago
Docs: https://docs.docker.com
Main PID: 60189 (dockerd)
Tasks: 51
Memory: 239.4M
CPU: 723ms
CGroup: /system.slice/docker.service
├─60189 /usr/bin/dockerd -H fd:// -s overlay2
└─60200 docker-containerd --config /var/run/docker/containerd/containerd.toml
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795448032-04:00" level=warning msg="Your kernel does not support swap memory limit"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795489588-04:00" level=warning msg="Your kernel does not support cgroup rt period"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.795499101-04:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.796089811-04:00" level=info msg="Loading containers: start."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.886351523-04:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon opti
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.913124323-04:00" level=info msg="Loading containers: done."
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932021936-04:00" level=info msg="Docker daemon" commit=9ee9f40 graphdriver(s)=overlay2 version=18.03.1-ce
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.932079832-04:00" level=info msg="Daemon has completed initialization"
Jul 05 14:49:50 cse-bennettuniv dockerd[60189]: time="2018-07-05T14:49:50.938512369-04:00" level=info msg="API listen on /var/run/docker.sock"
Jul 05 14:49:50 cse-bennettuniv systemd[1]: Started Docker Application Container Engine.
sudo systemctl status nvidia-docker
● nvidia-docker.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:40:51 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Jul 05 14:44:07 cse-bennettuniv systemd[1]: Stopped NVIDIA Docker plugin.
Here it gives the reason that there is no such file or directory.
sudo service nvidia-docker start
Failed to start nvidia-docker.service: Unit nvidia-docker.service not found. This I was doing to to veryfy the issue. But it got confirmed when I ran the following code in /lib/systemd/system
dgxuser#cse-bennettuniv:/lib/systemd/system$ ls | grep nvidia
nvidia-persistenced.service
This means there is no file named nvidia-docker.service. Now I dont understand even after install it properly, why I can't start the nvidia-docker?

Docker Engine fails on Azure Batch node

Scenario
I create a pool with multiple nodes (base image is Ubuntu Server 16.04), and provide the following start up command:
/bin/bash -c 'set -o pipefail; export DEBIAN_FRONTEND=noninteractive ; sudo -E apt update ; sudo -E apt upgrade -y ; sudo -E apt-get install -y --no-install-recommends apt-transport-https curl software-properties-common ; curl -fsSL "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e" | sudo -E apt-key add - ; sudo -E apt-add-repository "deb https://packages.docker.com/1.13/apt/repo/ ubuntu-$(lsb_release -cs) main" ; sudo -E apt-get update ; sudo -E apt-get install -y docker-engine ; sudo usermod -a -G docker $USER ; sudo -E service docker start ; journalctl -xe; wait'
The command servers the only purpose to install Docker Engine. Note also that I removed the option set -e in order to be able to run the command journalctl -xe and catch the following error.
Error
When creating the aforementioned pool, some nodes will fail the starting task. The behavior appears to be random, as not always a node fails, and, as mentioned, the other nodes do not fail.
The behavior does not depend on the size of the node (I tried both D2_v3 and NC6).
This is the output of journalctl -xe:
Oct 12 09:19:40 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
Oct 12 09:19:40 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Oct 12 09:19:40 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:40.605332263Z" level=info msg="libcontainerd: new containerd process, pid: 24492"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.608293321Z" level=info msg="[graphdriver] using prior storage driver: aufs"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626089049Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626378756Z" level=warning msg="Your kernel does not support swap memory limit"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626558660Z" level=warning msg="Your kernel does not support cgroup rt period"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626698864Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626834867Z" level=warning msg="Your kernel does not support cgroup blkio weight"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.626970070Z" level=warning msg="Your kernel does not support cgroup blkio weight_device"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.627384080Z" level=info msg="Loading containers: start."
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.630900065Z" level=info msg="Firewalld running: false"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.661877309Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A kernel: IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready
Oct 12 09:19:41 7d8bb094c57c400582f6031d59f1630000000A dockerd[24473]: time="2017-10-12T09:19:41.996853856Z" level=info msg="Loading containers: done."
Oct 12 09:19:42 7d8bb094c57c400582f6031d59f1630000000A kernel: aufs au_opts_verify:1585:dockerd[24490]: dirperm1 breaks the protection by the permission bits on the lower branch
Oct 12 09:19:45 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: docker.service: Main process exited, code=killed, status=11/SEGV
Oct 12 09:19:45 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Oct 12 09:19:45 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: docker.service: Unit entered failed state.
Oct 12 09:19:45 7d8bb094c57c400582f6031d59f1630000000A systemd[1]: docker.service: Failed with result 'signal'.
It appears that something went wrong in the creation of the network interface, but I'm not sure what and, especially, how to fix it.
Updated Answer, 2017-10-18:
The issue has been fixed with the latest platform image of Canonical UbuntuServer 16.04-LTS, and works with Go/Docker again.
Original Answer:
There's nothing wrong with your code. There's an issue with the Canonical UbuntuServer 16.04-LTS 201709190 platform image (which is, at this time, also latest) and Go/Docker.
Set the version of the image to deploy to 201708151 temporarily while the issue is fixed.
As an aside: if you're using Docker and Azure Batch, you should take a look at Batch Shipyard which provides this functionality. (full disclosure: I'm a contributor for this code.)

Service docker start not work(daemon), ubuntu-15.10, To run dockerfile with intelliJ

I have installed docker on ubuntu 15.10 but it does not start, these are the console outputs, I'm new with this from docker, try installing docker from this tutorial https://tecadmin.net/install-and-manage-docker-on-ubuntu/
My interest is to be able to run my dockerfile from intellij
service docker start
root#rubnPC:/var/lib/docker# service docker start
Job for docker.service failed because the control process exited with error
code. See "systemctl status docker.service" and "journalctl -xe" for details.
systemctl status docker.service
root#rubnPC:/var/lib/docker# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset:
enabled)
Active: failed (Result: exit-code) since sáb 2017-06-03 18:24:42 VET; 3min
18s ago
Docs: https://docs.docker.com
Process: 21270 ExecStart=/usr/bin/dockerd -H fd:// (code=exited,
status=1/FAILURE)
Main PID: 21270 (code=exited, status=1/FAILURE)
jun 03 18:24:42 rubnPC systemd[1]: Starting Docker Application Container
Engine...
jun 03 18:24:42 rubnPC dockerd[21270]: time="2017-06-03T18:24:42.614560352-
04:30" le...id"
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Main process exited,
code=exited,...URE
jun 03 18:24:42 rubnPC systemd[1]: Failed to start Docker Application
Container Engine.
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Unit entered failed
state.
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Failed with result 'exit-
code'.
Hint: Some lines were ellipsized, use -l to show in full.
journalctl -xe
root#rubnPC:/var/lib/docker# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
jun 03 18:24:42 rubnPC dockerd[21270]: time="2017-06-03T18:24:42.614560352-
04:30" level=fa
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Main process exited,
code=exited, statu
jun 03 18:24:42 rubnPC systemd[1]: Failed to start Docker Application
Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Unit entered failed
state.
jun 03 18:24:42 rubnPC systemd[1]: docker.service: Failed with result 'exit-
code'.
jun 03 18:24:42 rubnPC polkitd(authority=local)[865]: Unregistered
Authentication Agent fo
jun 03 18:31:24 rubnPC polkitd(authority=local)[865]: Registered
Authentication Agent for
jun 03 18:31:24 rubnPC systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
System-Info
rubn _> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
Docker version
rubn _> docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:32:39 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this
host?
Kernel Version
rubn _> uname -a
Linux rubnPC 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
UPDATE: dockerfile
# Set the WILDFLY_VERSION env variable ENV WILDFLY_VERSION 10.0.0.Final ENV WILDFLY_SHA1 c0dd7552c5207b0d116a9c25eb94d10b4f375549
ENV JBOSS_HOME /opt/jboss/wildfly
# Add the WildFly distribution to /opt, and make wildfly the owner of the extracted tar content
# Make sure the distribution is available from a well-known place
RUN cd $HOME \
&& curl -O https://download.jboss.org/wildfly/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz \
&& sha1sum wildfly-$WILDFLY_VERSION.tar.gz | grep $WILDFLY_SHA1 \
&& tar xf wildfly-$WILDFLY_VERSION.tar.gz \
&& mv $HOME/wildfly-$WILDFLY_VERSION $JBOSS_HOME \
&& rm wildfly-$WILDFLY_VERSION.tar.gz
# Ensure signals are forwarded to the JVM process correctly for graceful shutdown
ENV LAUNCH_JBOSS_IN_BACKGROUND true
# Expose the ports we're interested in
EXPOSE 8080
# Set the default command to run on boot
# This will boot WildFly in the standalone mode and bind to all interface
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
ADD ROOT.war /opt/jboss/wildfly/standalone/deployments/
/etc/default/docker
# Docker Upstart and SysVinit configuration file
#
# THIS FILE DOES NOT APPLY TO SYSTEMD
#
# Please see the documentation for "systemd drop-ins":
# https://docs.docker.com/engine/articles/systemd/
#
# Customize location of Docker binary (especially for development testing).
#DOCKERD="/usr/local/bin/dockerd"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
Solved
Docker can't connect to docker daemon
Can you post the contents of /etc/default/docker?
It seems you have invalid content that is failing the startup. I'm guessing you have fd:// in it. If you do, just remove that & then try restarting docker just as before.

CentOS 7.0 docker fail to start service

I work with CentOS 7.0, and trying to configure docker, i used yum install docker for the docker installation.
when I start docker service, meets the follow problems:
[root#kiiby2r3 ~]# systemctl start docker.service
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
[root#kiiby2r3 ~]# systemctl status docker.service -l
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
Active: failed (Result: timeout) since Sun 2015-11-08 12:52:13 CST; 1h 3min ago
Docs: http://docs.docker.com
Main PID: 30368
Nov 08 12:48:35 kiiby2r3 docker[30368]: time="2015-11-08T12:48:35.968317600+08:00" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Nov 08 12:48:36 kiiby2r3 docker[30368]: time="2015-11-08T12:48:36.028124500+08:00" level=error msg="WARNING: No --storage-opt dm.thinpooldev specified, using loopback; this configuration is strongly discouraged for production use"
Nov 08 12:49:34 kiiby2r3 systemd[1]: docker.service operation timed out. Terminating.
Nov 08 12:51:04 kiiby2r3 systemd[1]: docker.service stopping timed out (2). Killing.
Nov 08 12:52:13 kiiby2r3 systemd[1]: Failed to start Docker Application Container Engine.
Nov 08 12:52:14 kiiby2r3 systemd[1]: Unit docker.service entered failed state.
The CentOS release version:
[root#kiiby2r3 ~]# uname -a
Linux kiiby2r3 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root#kiiby2r3 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
Can somebody give me a hint?
Thank you!

Resources