i have a problem with docker on my local machine and my internet provider. If i connect to another i don't have it error.
So, when i try to build the project
maxim#maxim-TM1701:~/dev/projects/buzz/back_new$ sudo docker-compose up
[sudo] password for maxim:
Building web
Step 1/9 : FROM python:3.4
3.4: Pulling from library/python
55cbf04beb70: Pull complete
1607093a898c: Pull complete
9a8ea045c926: Pull complete
d4eee24d4dac: Pull complete
b59856e9f0ab: Downloading [==================================================>] 112.7MB/112.7MB
acbc9a5bd738: Download complete
2bedfced3d32: Download complete
35cfd5596113: Download complete
54603c381292: Download complete
ERROR: Service 'web' failed to build: read tcp 192.168.31.82:48810->104.18.125.25:443: read: connection reset by peer
maxim#maxim-TM1701:~/dev/projects/buzz/back_new$ sudo docker-compose up
Building web
Step 1/9 : FROM python:3.4
3.4: Pulling from library/python
55cbf04beb70: Retrying in 2 seconds
1607093a898c: Download complete
9a8ea045c926: Download complete
d4eee24d4dac: Downloading [===========> ] 7.998MB/34.33MB
b59856e9f0ab: Downloading [=> ] 4.267MB/189.1MB
acbc9a5bd738: Waiting
2bedfced3d32: Waiting
35cfd5596113: Waiting
54603c381292: Waiting
^CGracefully stopping... (press Ctrl+C again to force)
How can i fix it?
Related
I am getting error as error creating overlay mount to /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged
Please find debug info below.
OS
root#cks-master:/vagrant/files# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Dockerfile
# cat ch5Dockerfile
FROM bash
CMD ["ping", "killer.sh"]
Build log
root#cks-master:/vagrant/files# podman build -t simple -f ch5Dockerfile .
STEP 1/2: FROM bash
ERRO[0000] error unmounting /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged: invalid argument
Error: error mounting new container: error mounting build container "6c0f88a6da54d713e18283e16521385fff736bc1a1072938fddfc6be4b3d43cc": error creating overlay mount to /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged, mount_data="nodev,metacopy=on,lowerdir=/var/lib/containers/storage/overlay/l/BNREFG6CRAAHJ7VSYG3EUXV5UO:/var/lib/containers/storage/overlay/l/MDSWZVRVZNCOW75JF32K6D4QQC:/var/lib/containers/storage/overlay/l/4G3NS52LYHWPTKA4FURHLYMAPF,upperdir=/var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/diff,workdir=/var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/work": invalid argument
root#cks-master:/vagrant/files#
podman version
root#cks-master:/vagrant/files# podman version
Version: 3.4.2
API Version: 3.4.2
Go Version: go1.15.2
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
root#cks-master:/vagrant/files#
Issue resolved.
I also posted the issue in podman room at https://app.element.io/#/room/#podman:fedoraproject.org
I am suggested with podman reset(command trace is below), then its complained about storage.conf, I removed that file and did reset again. Then its worked.
I still wonder whats inside of storage.conf causing this issue but I deleted before looking into it. Finally its worked and I am able to continue. Hope it helps.
Note: Post the deleting storage.conf file and podman reset, I tried with docker build as well just to check if docker has any dependency over storage.conf file, but none, docker build also executed successfully( command trace below)
root#cks-master:~# podman system reset -f
A storage.conf file exists at /etc/containers/storage.conf
You should remove this file if you did not modified the configuration.
root#cks-master:~# rm /etc/containers/storage.conf
root#cks-master:~# podman system reset -f
root#cks-master:~# podman build -t simple -f /vagrant/files/ch5Dockerfile .
STEP 1/2: FROM bash
Resolving "bash" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/bash:latest...
Getting image source signatures
Copying blob 9621f1afde84 done
Copying blob 1dd831616e40 done
Copying blob fd6cd28e0879 done
Copying config 8b332999f6 done
Writing manifest to image destination
Storing signatures
STEP 2/2: CMD ["ping", "killer.sh"]
COMMIT simple
--> cd1407a69ea
Successfully tagged localhost/simple:latest
cd1407a69ea490496d6635700958f2b5fcf2b1d01f8dd218dea0f83187e55872
root#cks-master:~# podman run --name simple simple
PING killer.sh (35.227.196.29): 56 data bytes
64 bytes from 35.227.196.29: seq=0 ttl=42 time=15.689 ms
64 bytes from 35.227.196.29: seq=1 ttl=42 time=14.662 ms
64 bytes from 35.227.196.29: seq=2 ttl=42 time=15.161 ms
^C
--- killer.sh ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 14.662/15.170/15.689 ms
root#cks-master:~# docker build -t simple -f /vagrant/files/ch5Dockerfile .
Sending build context to Docker daemon 3.141MB
Step 1/2 : FROM bash
latest: Pulling from library/bash
9621f1afde84: Pull complete
1dd831616e40: Pull complete
fd6cd28e0879: Pull complete
Digest: sha256:e4624241e953934fc4c396217253d8322ebda53be3b1863cd7795541d168034f
Status: Downloaded newer image for bash:latest
---> 8b332999f684
Step 2/2 : CMD ["ping", "killer.sh"]
---> Running in 306963a83d1c
Removing intermediate container 306963a83d1c
---> 51dee555fd57
Successfully built 51dee555fd57
Successfully tagged simple:latest
root#cks-master:~# ^C
root#cks-master:~#
When executing the following command:
$ sudo docker-compose -f custom-docker-compose.yml up -d
I see this normal output:
Pulling mymd-db (mariadb:10.5.6)...
10.5.6: Pulling from library/mariadb
6a5697faee43: Pulling fs layer
ba13d3bc422b: Pulling fs layer
a254829d9e55: Pulling fs layer
2ee2cadd29fc: Waiting
6915a184049d: Waiting
5ca6ffdb5f56: Waiting
1537f7bbef8b: Waiting
5790e54322d1: Waiting
ea98cb829471: Waiting
But then, out of the blue, I get the following error:
ERROR: error pulling image configuration: Get
https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/c4/c4655f911514fc440...Gmo%3D:
EOF
This happens from time to time. I don't know why. Does anybody know how to fix it or any workaround? I am running a CentOS server.
vim /etc/resolv.conf ,add
nameserver 8.8.8.8
service docker restart
And try again.
Most often than not,this is because of problems with your network
I have created my custom image using mongoclient and ycsb. Trying to push the image in my repo but getting "denied: requested access to the resource is denied" error.
I followed below steps:
$ sudo docker login https://hub.docker.io -u <username>
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<username>/mongoclient.ycsb ycsb d5df3ee39a2b 6 days ago 1.72 GB
docker.io/mongo latest af93e1bc9e2b 6 weeks ago 379 MB
docker.io/ycsb latest f13g3d629b1x 6 weeks ago 829 MB
$ sudo docker image push <username>/mongoclient.ycsb
The push refers to a repository [docker.io/<username>/mongoclient.ycsb]
0290cf7cgg01: Preparing
36337d65455g: Preparing
f3v7673685cb: Preparing
41c4edef8f6b: Preparing
ad6b931d9136: Preparing
506gc50g7a7b: Waiting
ae2dec2d34b1: Waiting
581ae1d6061a: Waiting
518d9e7fb316: Waiting
a4ecb2aa7787: Waiting
9a2e8a91bfb9: Waiting
a477b6b9ca24: Waiting
aa0c3a991ccd: Waiting
ce6476f44b21: Waiting
911d45679c35: Waiting
4b11524b05bf: Waiting
denied: requested access to the resource is denied
I had already created the public repo ""mongoclient.ycsb on my account.
I have setup a new Kubernetes v1.5 cluster.
I locally created a new docker image using :
# MAIN IMAGE
FROM gcr.io/google_containers/nginx-slim
I created it using the command :
docker build -t myapp:1 .
I can see that the image is avaiable and running :
docker ps | grep app
d6fc0508e56b myapp:1 "nginx -g 'daemon ..." 31 seconds ago Up 30 seconds 0.0.0.0:32354->80/tcp
Now I am trying to use the same image in a kubernetes deployment.
kubectl run app-deployment --image myapp:1 --replicas=1 --port=80
But doing so does not start the pod and I get the ERROR :
19s 3s 2 {kubelet 10.0.0.17} spec.containers{app-deployment} Normal Pulling pulling image "myapp:1"
18s 2s 2 {kubelet 10.0.0.17} spec.containers{app-deployment} Warning Failed Failed to pull image "myapp:1": unauthorized: authentication required
18s 2s 2 {kubelet 10.0.0.17} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "app-deployment" with ErrImagePull: "unauthorized: authentication required"
The files /root/.docker/config.json & /var/lib/kubelet/.dockercfg are currently empty. Is there something Ive missed in setting up Kubernetes ?
Since you are building a custom docker image, you have to build it in every node of your cluster that the scheduler could put the pod into.
Furthermore, you need yo specify in your PodSpec an imagePullPolicy of ifNotPresent to indicate the kubelet not to try to download your image if it is already present.
This should make your image work, but I strongly suggest you to push your image in a docker registry and let the nodes pull it from there.
I would like to use docker with amazon's elastic file system (EFS). So I mounted the EFS on the EC2 machine and set an efs-folder as the docker root folder in the docker config file. But when I want to create an image I get this error:
Step 1 : FROM ubuntu:14.04
14.04: Pulling from library/ubuntu
862a3e9af0ae: Extracting [==================================================>] 65.7 MB/65.7 MB
6498e51874bf: Download complete
159ebdd1959b: Download complete
0fdbedd3771a: Download complete
7a1f7116d1e3: Download complete
failed to register layer: Error processing tar file(exit status 1): errno 524
In the docker logs I get this error:
Error trying v2 registry: failed to register layer: Error processing tar file(exit status 1): errno 524
Attempting next endpoint for pull after error: failed to register layer: Error processing tar file(exit status 1): errno 524
Any ideas how I can solve this?
I solved it by adding -s devicemapper to the docker daemoncommand as described in an issue: New Docker versions cannot host datastore on NFS share