How can I publish my Docker image using the `regis...
# general
t
How can I publish my Docker image using the
registries
field to another container? I.e. I am running pants from a container that is in the same network as my localstack container. I can access it with
localstack
as the host and not
localhost
. But with
Copy code
registries=[
        "localstack:4510",
    ],
It is trying to reach Get
<https://localstack:4510/v2/>": dial tcp: lookup localstack on 192.168.65.5:53: no such host
c
What would your
docker push
command look like?
t
Well good question! I see that you are just calling
docker push
in the end. I really am wondering how the serverless plugin then can publish from docker-in-docker when an image is selected as target. Because that works as expected.
c
🤷
t
Will figure it out 👀 Sorry for this not pants related issue
c
Np. Normally I would've taken the opportunity to learn more about aws and lambdas etc, and maybe found some insights along the way.. :)
t
Will let you know once I have figured out how this is achieved
🙏 1
👍 1
So the requirements translate to
docker push localstack:4510/repo1
(see here). It seems that by default localhost is insecure registry. In the end I solved it adding "insecure-registries" : ["host.docker.internal:4510"] so that with the following I was able to publish my image to localstack with pants:
Copy code
registries=[
        "host.docker.internal:4510",
    ],
👍 1