EOF error while pulling images from docker - docker

I am getting following error for
docker pull openjdk
Using default tag: latest
Pulling repository docker.io/library/openjdk
Error while pulling image: Get https://index.docker.io/v1/repositories/library/openjdk/images: EOF
I have set HTTP_PROXY and HTTPS_PROXY in /etc/systemd/system/docker.service.d/http-proxy.conf and /etc/systemd/system/docker.service.d/https-proxy.conf respectively.
Still I am not able to pull any images from docker hub.
Following is the docker version output
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:20:01 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:20:01 2017
OS/Arch: linux/amd64

Here is my setting:
etc/systemd/system/docker.service.d
more http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://user:password#proxy.mycompany.com:8080/" "HTTPS_PROXY=http://user:password#proxy.mycompany.com:8080/" "NO_PROXY=localhost,127.0.0.1,.mycompany.com"
Note that HTTP_PROXY like HTTPS_PROXY both are using an http URL for the proxy. And make sure (with NO_PROXY) that any internal URL does not use the proxy.

Related

How to switch Docker mode(Linux/Windows)? no matching manifest for linux/amd64 in the manifest list entries

I am on Windows 10
Simple image building does not work
docker run -it --rm mcr.microsoft.com/windows/nanoserver:1809
Unable to find image 'mcr.microsoft.com/windows/nanoserver:1809' locally
1809: Pulling from windows/nanoserver
docker: no matching manifest for linux/amd64 in the manifest list entries.
Docker version shows
Client:
Cloud integration: v1.0.20
Version: 20.10.10
API version: 1.41
Go version: go1.16.9
Git commit: b485636
Built: Mon Oct 25 07:47:53 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.10
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:41:30 2021
OS/Arch: linux/amd64
Experimental: true
My settings
How to fix this problem?
Looks like you're in Windows Container, you need to switch to Linux Container.
Then, wait for docker restart and retry.

Named stage returns: Error parsing reference: "golang:1.7.3 as builder" is not a valid repository/tag

On Gentoo Linux kernel 4.12.12
added docker info and version below
docker info : https://pastebin.com/Ph9ibMna
> docker version
Client:
Version: 17.06.2-ce
API version: 1.27 (downgraded from 1.30)
Go version: go1.8.3
Git commit: cec0b72
Built: Thu Sep 28 07:14:33 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.2-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.8.3
Git commit: f5ec1e2
Built: Wed Sep 13 23:43:20 2017
OS/Arch: linux/amd64
Experimental: false
command:
> docker build -t some-test .
Sending build context to Docker daemon 234.9MB
Step 1/1 : FROM golang:1.7.3 as builder
Error parsing reference: "golang:1.7.3 as builder" is not a valid repository/tag: invalid reference format
from Dockerfile:
FROM golang:1.7.3 as builder
example taken from name-your-build-stages
The issue is your client is 17.06.2-ce and server is 17.03.2-ce. Multi stage build came in 17.06 i believe, so you need that version on the server. It is the server that processes the build. The client will only send the information to the server
So upgrade your server and it will work fine

docker golang API ContainerList fails with TLS

I have dockerd configured with TLS authentication on CoreOS;
Cli docker images returns me valid list of images:
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest c75bebcdd211 3 weeks ago 1.106 MB
But trying it in "go" code:
export DOCKER_CERT_PATH=~/.docker
images, err := cli.ImageList(context.Background(), types.ImageListOptions{})
returns me empty list
Below is my docker configuration:
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.3
Git commit: d5236f0
Built: Tue May 30 23:15:08 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.3
Git commit: d5236f0
Built: Tue May 30 23:15:08 2017
OS/Arch: linux/amd64
You have a list of images but you haven't created any containers yet, therefore cli.ContainerList() returns empty list
What you are probably looking for is cli.ImageList()
Docs:
https://godoc.org/github.com/docker/engine-api/client#Client.ImageList

docker private registry change from v1 to v2 while pulling an image

There is a docker is registry v2.
An image is pushed to docker private registry. Able to see it using curl command:
$ curl -s -X GET http://<registry>:<port>/v2/<image>/tags/list
{"name":"<image>","tags":["latest"]}
However, not able to pull the image from other machines. It appears that it is trying to pull from v1 instead of v2
Pulling the above image on a windows 10 machine.
docker pull <registry>:<port>/<image>:latest
Getting the following error:
Pulling repository <registry>:<port>/<image>
Network timed out while trying to connect to
http://<registry>:<port>/v1/repositories/<image>/images.
You may want to check your internet connection or if you are behind a proxy.
Not using any proxy settings.
Here is version details
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: c6d412e
Built: Fri Mar 24 00:00:50 2017
OS/Arch: linux/amd64
Experimental: true
Could not found any docker settings for changing from v1 to v2.
How do I make it to pull from v2 / resolve the above error?
EDIT: log shows
ICMP Destination Unreachable: Destination port unreachable

Can't get Docker image after windows installation

I just installed docker on my windows 10 server,
Installation went fine but I can't seem to get images from central docker repo.
those are my specs:
c:\>docker version
Client:
Version: 1.13.0
API version: 1.25
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: windows/amd64
Server:
Version: 1.13.0
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: linux/amd64
Experimental: true
This is my test command:
c:\>docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: remote error: tls: access denied.
See 'docker run --help'.
This is what I get when running curl on that repo:
c:\>curl -k https://registry-1.docker.io/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
I guess that there is something to do with my company DNS/Network,
did anyone encounter this issue on windows?
You need to set your proxy env variables.
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://username:password#proxy:port/", [EnvironmentVariableTarget]::Machine)
Restart-Service docker
Check this for reference: https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/configure-docker-daemon
And more common:
https://docs.docker.com/engine/admin/systemd/#http-proxy
As I replied to #Falco Alexander I got some PowerShell errors, But The proxy was already set in my env. variables.
What finally did the trick was to set the proxy inside the docker GUI:
And then restart the service.

Resources