What does HTTP 400 when pulling docker image mean? - docker

I am asking docker to build an ASP.NET 5 beta6 application image for me at Ubuntu 14.04.1 virtual machine:
docker build -t instanceName .
using dockerfile that starts with:
FROM microsoft/aspnet:1.0.0-beta6
It responds with this message:
Sending build context to Docker daemon 124.4 kB
Sending build context to Docker daemon
Step 0 : FROM microsoft/aspnet:1.0.0-beta6
Pulling repository microsoft/aspnet
9424b500cebc: Error pulling image (1.0.0-beta6) from microsoft/aspnet, HTTP code 400
ba249489d0b6: Download complete
19de96c112fc: Download complete
b92a854a78d0: Download complete
63e9265ef57c: Error pulling dependent layers
INFO[0019] Error pulling image (1.0.0-beta6) from microsoft/aspnet, HTTP code 400
It does similar thing when I replace dockerfile definition to just FROM microsoft/aspnet.
What does it mean? If it were 404, I would understand that there is no such image. But "Bad Request"? Can I make the request... better?

Related

SMTP4DEV - Docker pull error - Why get I Unkown Blob

When trying to get (pull or run) the docker smtp4dev, I've got the following error message : /usr/bin/docker-current: unknown blob.
I'm trying to run it from :
a CentOS VM,
with Docker version 1.13.1, build cccb291/1.13.1
Please find hereafter my terminal output
sudo docker run --rm -p 3001:80 -p 2525:25 rnwood/smtp4dev:3.1.0-ci2020052101
Unable to find image 'rnwood/smtp4dev:3.1.0-ci2020052101' locally
Trying to pull repository rnwood/smtp4dev ...
3.1.0-ci2020052101: Pulling from rnwood/smtp4dev
68ced04f60ab: Downloading [=======> ] 3.898 MB/27.09 MB
4ddb1a571238: Downloading [===========> ] 3.784 MB/17.06 MB
94b78a0446e2: Download complete
b48f8e1b0b06: Downloading
a41ea3d79519: Waiting
7064c9d40b9c: Waiting
/usr/bin/docker-current: unknown blob.
See '/usr/bin/docker-current run --help'.
Thanks by advance for your support.
Following the new update of SMTP4DEV...it seems now working.. no root cause found...
The best hypothesis : problem with proxy network which leads to fail the build of the docker...
Stay tuned...

docker/docker-compose build --pull behavior

I am trying to find how docker build --pull/docker-compose build --pull option works.
I found a link - https://docs.docker.com/compose/reference/build/
All it says is that -
Always attempt to pull a newer version of the image.
But I still have some questions unanswered -
e.g. consider this image - mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim
When I use the --pull flag,
Would it pull aspnetcore 3.1 version if available?
Would it pull nightly build if available?
Would it always download the image regardless if the local image and the latest image are same?
What would happen if the machine doesn't have internet connectivity while running docker build --pull?
Would it pull aspnetcore 3.1 version if available?
No, because it wouldn't be tagged :3.0-buster-slim.
Would it pull nightly build if available?
No, because it wouldn't be tagged :3.0-buster-slim.
Would it always download the image regardless if the local image and the latest image are same?
No. It will download an update if the local and remote sha256 hashes differ. If they're the same it won't re-download it. There's no point.
Let's test it with a simple one-line Dockerfile:
FROM alpine:latest
First time:
$ docker build --pull .
...
latest: Pulling from library/alpine
Digest: sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb
Status: Downloaded newer image for alpine:latest
Subsequent builds:
$ docker build --pull .
...
latest: Pulling from library/alpine
Digest: sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb
Status: Image is up to date for alpine:latest
What would happen if the machine doesn't have internet connectivity while running docker build --pull?
The build fails. With networking disabled, --pull fails:
$ docker build --pull .
Sending build context to Docker daemon 2.048kB
Step 1/1 : FROM alpine:latest
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: server misbehaving
Without --pull it works:
$ docker build .
Sending build context to Docker daemon 2.048kB
Step 1/1 : FROM ubuntu:latest
---> a2a15febcdf3
Successfully built a2a15febcdf3
no
no
it will always check for a new image with the name:tag mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim
it should fail with error

Error in Docker for Windows tutorial

I'm new to Docker so I don't even know where to look. Here are the instructions:
Next, pull a base image that’s compatible with the evaluation build, re-tag it and to a test-run:
docker pull microsoft/windowsservercore:10.0.14393.321
docker tag microsoft/windowsservercore:10.0.14393.321 microsoft/windowsservercore
docker run microsoft/windowsservercore hostname
69c7de26ea48
And this is the error I get on the docker run step:
docker: Error response from daemon: container
6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f
encountered an error during CreateContainer: failure in a Windows
system call: No hypervisor is present on this system. (0xc0351000)
extra info:
{"SystemType":"Container","Name":"6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f","Owner":"docker","IsDummy":false,"IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\ProgramData\Docker\windowsfilter\6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f","Layers":[{"ID":"17e4231d-380e-5dae-b734-0182defea00c","Path":"C:\ProgramData\Docker\windowsfilter\1226fe85e49abd361df8019342eec380ab577268565d2f3d813adcf37d1ccac4"},{"ID":"5fd42877-5043-5d33-a842-d70584cb03eb","Path":"C:\ProgramData\Docker\windowsfilter\53f86340ec419aae07b48e3624d00d7d6f5491f284d8d6e1e62fb7909d9a5fba"}],"HostName":"6abd92755a8d","MappedDirectories":[],"SandboxPath":"C:\ProgramData\Docker\windowsfilter","HvPartition":true,"EndpointList":["91c8a929-c40f-4ad3-a3d2-2906b51cb50a"],"HvRuntime":{"ImagePath":"C:\ProgramData\Docker\windowsfilter\1226fe85e49abd361df8019342eec380ab577268565d2f3d813adcf37d1ccac4\UtilityVM"},"Servicing":false,"AllowUnqualifiedDNSQuery":true}.

docker build giving unauthorized: authentication required

My docker version is
Docker version 1.12.2-cs2-ws-beta, build 050b611
I am trying to build the image using command
docker build -t iis-dockerfile .
The DockerFile content is
FROM microsoft/iss
RUN echo "Hello World - Dockerfile" > C:\inetpub\wwwroot\index.html
config.json is
{
"auths": {
"https://index.docker.io/v1/": {
"auth": <somekey>
}
}
}
On running docker build, it gives error
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM microsoft/iss
unauthorized: authentication required
I have already done docker login. That's how config.json is created. I am new to containers and following the get started tutorial https://blogs.msdn.microsoft.com/allthingscontainer/2016/09/15/windows-containers-getting-started-a-step-by-step-guide/. Any idea how can I work around this.
Also I figured out that docker pull is working for me. While this also required authentication
Just an observation. Make sure your docker file has correct base image name. Are you sure you want FROM microsoft/iss and not FROM microsoft/iis?
When I tried to create new image with correct base image. It seem to work.
Docker docker build -t test-iid .
Sending build context to Docker daemon 344.9 MB
Step 1/2 : FROM microsoft/iis
latest: Pulling from microsoft/iis
3889bb8d808b: Downloading
3430754e4d17: Downloading
7aee39cd34f9: Downloading [> ] 540 kB/122.7 MB
5b8e6b632025: Download complete
e067d71858d2: Download complete

Docker cloud repository push: access to the requested resource is not authorized on Fedora 23

I've just come over from tutum and and am trying to deploy to a docker cloud repository. I've created the repository and have tagged an existing image:
docker tag deploy foo/rtb
When I attempt to push my tagged image up like so:
docker push foo/rtb
I get this:
The push refers to a repository [docker.io/foo/rtb] (len: 0)
18118bb6b8ef: Preparing
unauthorized: access to the requested resource is not authorized
The repository exists and I've logged in to docker. Is there something I'm missing?
Interestingly enough, if I try to delete the image I get an error like this:
Error response from daemon: conflict: unable to delete 18118bb6b8ef
(must be forced) - image is referenced in one or more repositories
Error: failed to remove images: [18118bb6b8ef]
I had been using docker 1.9.1. That's the version in the Fedora 23 repo.
The kind folks at docker tech support recommended I upgrade to the latest 1.10.3
Upgrading then doing
docker logout
followed by
docker login
fixed everything up.
Did you tag your image ?
docker build --tag docker.io/<yourdockerhubname>/<appname> .
docker build --tag docker.io/moskalr/rtb .
docker push docker.io/<yourdockerhubname>/<appname>
docker push docker.io/moskalr/rtb
the push should respond with something which mentions the dockerhub image name

Resources