docker system df - Error response from daemon - macos

I am using Docker 3.3.1 on macOS Big Sur 11.3.
I get the following error message:
docker system df
> Error response from daemon: error getting build cache usage:
> failed to get usage for bm9...za9: stat
> /var/lib/docker/overlay2/r6y...dma: no such file or directory
What does not show anything is:
docker ps --all
What does not work, is:
docker-compose down
docker image prune
docker system prune -a
docker rmi {all images}
What can I do?

What solved it at the end was:
Open Docker dashboard
Select Clean / Purge data
Restart Docker (if not automatically done)

Related

failed to shutdown container in docker:

when im trying to build an image with command docker build im getting this error
im using windows docker desktop
The command '/bin/sh -c yarn install --production' returned a non-zero code: 4294967295: failed to shutdown container: container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
how this error be resolved
This must be due to windows host failure on docker call when try to shut down the container
Try by restarting docker demon
sudo service docker restart
Check the status of the Docker containers:
docker ps -a
stop and remove it:
docker stop <container-id>
docker rm <container-id>
Then try by building the image again. If the problem still persists, consider upgrading to the latest version of Docker or clear docker cache or
docker system prune

Error "readlink /var/lib/docker/overlay2/l: invalid argument"

I'm getting this error when executing docker run --rm -it alpine /bin/sh:
latest: Pulling from library/alpine
8921db27df28: Already exists
Digest: sha256:f271e74b17ced29b915d351685fd4644785c6d1559dd1f2d4189a5e851ef753a
Status: Downloaded newer image for alpine:latest
ERRO[0040] error waiting for container: context canceled
docker: Error response from daemon: Failed to inspect container 9919d1156d3960b46bca915bdf3b1d2320f463edbea5c39cacdc8b29640534fe: Error response from daemon: readlink /var/lib/docker/overlay2/l: invalid argument.
I'm using Docker Desktop on Windows with WSL 2.
I've tried docker rmi alpine:latest, but the error persisted.
I've tried docker system prune --all, but it didn't help.
Some of workarounds I've used:
When using the Docker command line, I specified a different version
of the image. Instead of alpine:latest, I used alpine:3.16, and it
helped.
I used Hyper-V instead of WSL 2 (Docker Desktop → Settings → General. Untick "Use the WSL 2 based engine")
As suggested in this answer, I reset Docker WSL 2 data. But
instead of resetting all Docker data, it is possible to clear only
WSL 2: Docker Desktop → Troubleshoot (it is the "bug" icon next to
the Settings icon) → Clean/Purge data, select WSL 2, and press Delete.

Cannot build docker image after run Minikube build-env

I'm using Minikube in Windows 10 and I'd like to use locally built Docker images instead of images hosted in a registry, so, according this tutorial, I have to run next commands:
Use local kubernetes and images:
> minikube docker-env
The output is:
PS C:\WINDOWS\system32> minikube docker-env
$Env:DOCKER_TLS_VERIFY = "1"
$Env:DOCKER_HOST = "tcp://10.98.38.126:2376"
$Env:DOCKER_CERT_PATH = "C:\Users\MyUser\.minikube\certs"
# Run this command to configure your shell:
# & minikube docker-env | Invoke-Expression
To configure the shell, run this:
> & minikube docker-env | Invoke-Expression
After that, I need to build a new image:
PS D:\repos\test> docker build -t miImage:v1 .
And I have next error:
PS D:\repos\test> docker build -t miImage:v1 .
Sending build context to Docker daemon 8.62MB
Step 1/10 : FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
Get https://mcr.microsoft.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
This is error is thrown since I configured it to use local images, is there any way to fix it?
it looks like the machine that you're using to build is unable to reach https://mcr.microsoft.com/v2/ to confirm that, try to send a simple GET to the URL
wget https://mcr.microsoft.com/v2/
if that's the problem, you can use a different machine to pull the image, then save it to a file and load it on the target machine.
#on a machine connected to internet
docker pull mcr.microsoft.com/dotnet/core/sdk:2.2
docker save mcr.microsoft.com/dotnet/core/sdk:2.2 > dotnetsdk2_2.tar
# download the file
# on the target machine
docker load < dotnetsdk2_2.tar
then your build should work without a problem using the local version of the image.

CouchDB on docker desktop for OSX fails to start

I'm trying to install CouchDB on docker desktop for OSX. I follow the following steps:
docker pull couchdb (which works)
I then start the docker image:
docker run -d --name test-couchdb couchdb:latest
The log reports this:
[notice] 2019-08-30T10:27:03.039090Z nonode#nohost <0.325.0> --------
chttpd_auth_cache changes listener died database_does_not_exist at
mem3_shards:load_shards_from_db/6(line:395) <=
mem3_shards:load_shards_from_disk/1(line:370) <=
mem3_shards:load_shards_from_disk/2(line:399) <=
mem3_shards:for_docid/3(line:86) <= fabric_doc_open:go/3(line:39) <=
chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:195) <=
chttpd_auth_cache:listen_for_changes/1(line:142) [error]
2019-08-30T10:27:03.039976Z nonode#nohost emulator -------- Error in
process <0.461.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,39}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,195}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,142}]}]}
[notice] 2019-08-30T10:27:03.065708Z nonode#nohost <0.347.0> --------
couch_replicator_clustering : cluster stable [notice]
2019-08-30T10:27:03.073623Z nonode#nohost <0.360.0> -------- Started
replicator db changes listener <0.462.0>
Seems like an Erlang error.
When I do curl http://127.0.0.1:5984 or curl localhost:5984 I get a connection refused message both times, probably because the listener is not up and running....
I'm thinking this is an incompatibility issue, but not sure
This is a simple attempt to get another container started:
Vans-MacBook-Pro:~ vw$
docker pull couchdb
Using default tag: latest
latest: Pulling from library/couchdb
Digest: sha256:7537a9047fea8960ed9e88123a2cb9cbd96db51767f9a9b3ccfcb174b11408c1
Status: Image is up to date for couchdb:latest
docker.io/library/couchdb:latest
vw$ docker run -d --name my2-couchdb couchdb
2e2e37c8fb6b63ebbdc874396ce64a22727706237cb05bdbf256e4048f3346ef
vw$ docker run -p 5984:5984 -d my2-couchdb
Unable to find image 'my2-couchdb:latest' locally
docker: Error response from daemon: pull access denied for my2-couchdb, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
I had the same problem, got it to work by including admin username/password and port, like this:
docker run -d --name couchdb -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -p 5984:5984 couchdb:latest

docker :manifest for microsoft/windowsservercore:latest not found

I want to run IIS in my Docker container
But when I write this command :
docker pull microsoft/windowsservercore
I get this error :
Using default tag: latest
Error response from daemon: manifest for microsoft/windowsservercore:latest not found
Microsoft has deprecated the latest tag
https://techcommunity.microsoft.com/t5/Containers/Removing-the-latest-Tag-An-Update-on-MCR/ba-p/393045
the official image with latest tag is
docker run mcr.microsoft.com/windows/servercore:ltsc2019
While using the docker pull command "docker run mcr.microsoft.com/windows/servercore:ltsc2019below".
I am getting this error "docker: Error response from daemon: open \.\pipe\docker_engine_windows: The system cannot find the file specified."

Resources