-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker compatibility: Container Inspect returns null for NetworkSettings.Networks #9837
Comments
This issue appears to be related to #6803
|
Care to open a PR to attempt to fix this? |
I really want to, and started to look into doing so... but it's a lot to learn. I don't entirely understand what many of the |
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 Care to look at this one? |
The compat endpoint for container inspect must return {} instead of null for NetworkSettings.Networks. Fixes containers#9837 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
The result of the
ImageInspect
API request:GET /v1.30/images/curlimages%2Fcurl:latest/json
has
NetworkSettings.Networks
set to "null". That should not be the case. See https://docs.docker.com/engine/api/v1.30/#operation/ContainerInspectExample docker API request:
GET /v1.30/containers/7d6274e7015544739788b479d4d05a49e452a6e5c24a9e788c0e580b40524a21/json
And response:
Note the
"Networks":null
in that response.This results in an issue when using testcontainers,
Testcontainers.exposeHostPorts
results in an exception:Cannot invoke "java.util.Map.values()" because the return value of "com.github.dockerjava.api.model.NetworkSettings.getNetworks()" is null
Here's
socat
output of the docker socket communication, captured by running:socat -v UNIX-LISTEN:/tmp/fake,fork UNIX-CONNECT:/run/user/1000/podman/podman.sock
socat-docker-socket.log
Steps to reproduce the issue:
I reproduced the issue by running testcontainers using the information provided at testcontainers/testcontainers-java#3934
Describe the results you received:
NetworkSettings.Networks
is returned as nullDescribe the results you expected:
NetworkSettings.Networks
is populatedAdditional information you deem important (e.g. issue happens only occasionally):
Discovered when using testcontainers: testcontainers/testcontainers-java#3934
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
physical
The text was updated successfully, but these errors were encountered: