Change/Degrade Docker API version - docker

Need some serious help, I have installed docker on ubuntu18.04, and also tested through command 'docker run hello-world', it ran successfully. Now when I run 'docker compose up -d', it says
'Error :Couldn't connect to docker daemon.You may need to create docker-machine start default'.
Also when checked error through docker --verbose it says
'Error:Bad Request : Client API version is too new 1.36 -Maximum supported API version is 1.35'.
that's the case then how can I upgrade the API-version in for docker? My docker version is 17.12.

Plz check if you are running the correct command, it is:
docker-compose up -d
you are missing a "-"

Related

Docker Installation Problems

I'm new to using Docker (never used it before) and I'm running into these errors:
I installed the Docker for Windows and following the steps on this
tutorial, but Docker Desktop doesn't load up for me at all.
I tried to run the docker pull hello-world command but I'm getting the error: 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.
How do I fix this? Thanks

Gitlab-runner + Docker + Windows - Invalid volume specification

I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
Docker is not fully supported by GitLab Runner on Windows yet.
The workaround is to use Windows Subsystem for Linux and install gitlab-runner there:
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt-get install gitlab-runner
gitlab-runner exec docker build
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.

Mattermost with Docker for Windows error: invalid volume specification

I try to get Mattermost working with Docker for Windows. As mentioned here I executed the following command:
docker run --name mattermost-preview -d --publish 8065:8065 mattermost/mattermost-preview
After pulling and extracting the files, docker exits and throws the following error:
docker.exe: Error response from daemon: Unrecognised volume spec: invalid volume specification: './mattermost-data'.
Running Windows Server 2019 PreRelease 17623 and docker 17.10.0-ee-preview-3
Feedback from our engineers is that while they've never used Docker with Windows, your issue might be Windows related because it can't create a Docker volume (maybe related to the different path syntax between Linux and Windows ?)
Not sure if this will help, but here are the very basic example using volume on Windows Engine.
docker run -it -v C:\Users\Administrator\:C:\Users\public microsoft/nanoserver powershell
Also, you might want to use stable release channel instead of pre-release version of Windows. There are number of changes made, and base images will not be compatible. It is likely that the author of this image built it for Windows stable release.
Maybe, contact support for Mattermost?

Docker for Windows - Cannot run docker-compose up without getting "does not exist" or "login" errors

FYI - This all works when run on a Mac, but I am wanting to run on Windows.
I am running the following commands from IntelliJ terminal:
1 - docker login (logging in with my credentials and getting the success message)
2 - docker-compose up (to create and start the container)
However upon running the second command, I am greeted with:
Pulling marklogic (xxxxxxx:latest)...
ERROR: pull access denied for ..., repository does not exist or may require 'docker login'
I have searched the forums and found nothing to explain what is going wrong, other than my colleagues explanation that Windows is rubbish.
Any help would be appreciated.
Some extra info:
docker -v
Docker version 17.12.0-ce, build c97c6d6
docker-compose -v
docker-compose version 1.18.0, build 8dd22a96
Well pressassociation/faux-uds-marklogic isn't in DockerHub, so I guess you have to build that first yourself, or make sure your are pointing at an internal company repository that someone else has pushed the image to.
Perhaps it works on the Mac because a docker login has been made to an internal registry before running the docker-compose up ?
Do you use your own registry (docker-registry.xxx) in your project?

Error while running docker run hello-world

I am new to DOCKER. I am using Community Edition, stable version on Windows 10 64bit OS.
Docker is installed successfully and it is showing status as running. However when i try below command i get error :
C:\Program Files\Docker\Docker>docker run hello-world
docker: error during connect: Post http://C:2375/Program%20Files/Docker/Docker/v1.27/containers/create: dial tcp: lookup C: getaddrinfow: No such host is known..
See 'docker run --help'.
Docker version is
C:\Program Files\Docker\Docker>docker --version
Docker version 17.03.1-ce, build c6d412e
can anyone please help?
I recommend you to go for docker tool box if it is for development purpose. I too faced few issues when i was trying to install docker on my Windows 10.
Before go for further investigation about your problem, i want you to check the following;
Make sure Virtualization enabled. you can check it in BIOS configuration.
In final completion wizard of docker window, you must check "Launch Docker" (it will check by default)
If you think you installed properly, you should able to see the docker icon in the status bar.
If all the above criteria's seems fine, you can run the hello-world program and could able to see the output from docker hub.
For more information on how to install docker tool box on you windows. you can refer the docker tool box for windows
If you still have any issues, please type the below command on your terminal and send the result
"docker info"
Hope this will help for you!

Resources