Docker compatibility: Container Inspect returns null for NetworkSettings.Networks #9837
Labels
Good First Issue
This issue would be a good issue for a first time contributor to undertake.
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
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: