I use it for the first time (I don't understand the meaning of the error)

I use it for the first time.

I got an error when doing image build
$docker image build -t sample:latest .
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for Docker Hub
↑I don’t know how to solve this
Please tell me
DockerHub: docker.io / library/ruby:2.7

Please share your Dockerfile, so we can get a better understanding of the situation.

Thank you for reply!!


FROM ruby:2.7
RUN mkdir /var/www
COPY main.rb /var/www
CMD ["ruby" , "/var/www/main.rb"]

Thenk you!
I was able to avoid the error!

Add to file↓


Adding docker.io to insecure-registries shouldn’t be necessary. Make sure your ca certificates are up to date (usualy provided by the cacerts package).

If you are in a corporate environment and a https_proxy is used to break the security context for inspection, make sure to talk to your it-service or admins regarding your experience, so they can tell you what needs to be done.

Bypassing the certificate validiation for a publicly available https server is a risky workaround as you would not detect a man in the middle attack or if the domain is taken over by a third party with malicous intend…

1 Like

Oh, it’s a dangerous workaround. Thank you.
I told you yesterday that I was able to avoid it, but in fact I could do it in python,
but in ruby I couldn’t do it with the same error after all.
ca-certificates is the latest. I’ll try!