I am not able to run my python project test using gitlab ci. I am using gitlab public and runner run on my windows machine. I can run .gitlab-ci.yml using share runner on gitlab cicd but failed when I run my own runner.
Runner is installed and registered successful in my windows7 (executor-docker,no tag define, default image python:3.6)
I can see my windows runner run activated (green) in gitlab cicd and I disabled shared runners
My windows is already have docker installed (docker quickstart terminal)
When commit my jobs failed with the following error message
Running with gitlab-runner 13.0.1 (21cb397c)
on myhp7runner TKAFPyGA
Preparing the "docker" executor
00:10
ERROR: Removing network for build
ERROR: Preparation failed: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. (docker.go:1003:0s)
Will be retried in 3s ...
ERROR: Removing network for build
ERROR: Preparation failed: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. (docker.go:1003:0s)
from MINGW64 CLI
$ docker --version
Docker version 18.03.0-ce, build 0520e24302
$ net start com.docker.service
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
$ docker version
Client: 18.03.0-ce
API version: go1.9.4
Git comFri Mar 23 08:31:36 2018
OS/Arch: falsews/amd64
Orchestrator: swarm
Server: Docker Engine - Community
Engine: 19.03.5
API version: go1.12.12imum version 1.12)
Git commit: Wed Nov 13 07:28:45 2019
OS/Arch: false/amd64
containerd:al: v1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init: 0.18.0
GitCommit: fec3683
$ docker-machine env --shell cmd default
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=C:\Users\dz-12NT\.docker\machine\machines\default
SET DOCKER_MACHINE_NAME=default
SET COMPOSE_CONVERT_WINDOWS_PATHS=true
REM Run this command to configure your shell:
REM #FOR /f "tokens=*" %i IN ('"C:\Program Files\Docker Toolbox\docker-machine.exe" env --shell cmd default') DO #%i
Not able to start docker service. How to resolve this issue. Thank you.
Related
I am a newbie to docker and I am performing the following steps
Installed docker-desktop on windows
Pulled the image "ubuntu" (tag is "jammy")
Created the container from the above image
Tried to pull the 'hello-world' docker image with the command (docker pull hello-world)
This gives me the following error
Using default tag: latest
**Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?**
I tried to run the command docker version and it gave me the following output
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 17:10:06 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I then tried the command sudo service docker start but it gives me the below error
docker: unrecognized service
I am stuck here and am trying to find a way to make the docker commands work in my ubuntu docker container. Please help me in understanding what is going wrong and how to resolve it.
Ubuntu version on the container:
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Note 1: I have used the sudo also for all the above commands but still the same result.
Note 2: I have also enabled Expose daemon on tcp://localhost:2375 without TLS option in the docker desktop and restarted my pc
Recently, I installed Docker for Windows and pulled the Get-starting container for WLS and it worked fine.
However, after I restarted my computer, the client doesn't start automatically, when I once start it manually nothing happened and after starting it again, it shows me docker failed to initialize
the operation has timed out.
I don't remember doing something that makes a problem.
Then I checked the version of Docker in powershell ad administrator and the result is:
PS C:\Windows\system32> docker version
error during connect: In the default daemon configuration on Windows,
the docker client must be run with elevated privileges to connect.: Get
"http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open
//./pipe/docker_engine: The system cannot find the file specified.
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 12:00:56 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
I also tried the command (& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon) here in this question and it doesn't work.
Any help would be appreciated.
I'm running on ubuntu 18.04 with docker version:
>> docker version
Client: Docker Engine - Community
Version: 19.03.6
API version: 1.40
Go version: go1.12.16
Git commit: 369ce74a3c
Built: Thu Feb 13 01:27:48 2020
OS/Arch: linux/amd64
Experimental: false
each time I reboot my machine and try to use docker (e.g docker ps), I get an error:
>> docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
after I run:
>> service docker stop
>> service docker start
everything is back to normal..
any ideas how to solve it?
you should run
sudo systemctl enable docker
it will configure the system to start the service at reboot
I want to be able to use the --squash switch when building docker images as this shaves several MB of the result image.
This requires experimental features enabled for docker.
Executing a docker --version confirms (as it should) experimental features to be off on hosted Azure Pipelines agents.
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:15:30 2018
OS/Arch: linux/amd64
Experimental: false
Linux agents are running
Kernel Version: 4.15.0-1022-azure
Operating System: Ubuntu 16.04.4 LTS
OSType: linux
Architecture: x86_64
I've tried altering /etc/systemd/system/docker.service.d/docker.conf and /etc/docker/daemon.json to start with/include experimental flags, but didn't succeed in enabling it.
docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --experimental=tr
or
daemon.json
{
"experimental": true
}
But don't unsure if I can restart the daemon on a hosted agent.
Currently doing yaml builds invoking docker from bash, but didn't see anything around experimental in the web interface either.
If i spin up my own Ubuntu VM and host an agent on that, experimental works, but want to avoid cost and maintenance by using the hosted agents.
In the Ubuntu Image you can simply restart the docker service, after the daemon.json is updated. I use a script with two lines:
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
sudo service docker restart
Enabled it using the following script before the docker build task in my pipeline.
- script: |
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
sudo service docker restart
displayName: 'Enable docker experimental features for squashing '
I want to Running Docker Containers on Marathon,
So I start the mesos-slave with --containerizers=docker,mesos
/usr/local/Cellar/mesos/0.22.1/sbin/mesos-slave --master=zk://localhost:2181/mesos --log_dir=/Users/wangyao/WorkAndLog/mesos/log --work_dir=/Users/wangyao/WorkAndLog/mesos/work --containerizers=docker,mesos
I1216 11:17:16.407368 2038878976 logging.cpp:172] INFO level logging started!
I1216 11:17:16.407878 2038878976 main.cpp:156] Build: 2015-05-12 19:28:23 by brew
I1216 11:17:16.407896 2038878976 main.cpp:158] Version: 0.22.1
Failed to create a containerizer: Could not create DockerContainerizer: Failed to execute 'docker version': exited with status 1
it told me "Failed to execute 'docker version'" ,
and I execute "docker version"
wangyaos-MacBook-Pro-2:~ wangyao$ docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
My questions:
what is 'docker version' use for?
in order to start mesos with --containerizers=docker,mesos, do I need to install docker on my Os ?
how to solve this issue "Failed to execute 'docker version'"?
The "Running Docker Containers on Marathon" uses Docker, which means you need to have a Linux host.
If you are on Mac OS, you would need to install docker-toolbox in order to get a VirtualBox VM (Virtual Machine) on which you can have docker.
docker version displays the version of the docker client and docker server: the server part fails, since it does not run on top of a Linux kernel (but a Mac one).