podman events --format json returns null via remote api
#28.325 aperta il 19 mar 2026
Metriche repository
- Star
- (31.686 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Issue Description
When running podman events --format json --filter event=start inside a container that uses Podman in remote mode (remote = true with a forwarded Docker socket), container start events are returned as the literal JSON value null instead of a proper event JSON object.
This breaks any tooling that parses event JSON, notably the devcontainers CLI (@devcontainers/cli) which crashes with:
TypeError: Cannot read properties of null (reading 'status')
Steps to reproduce the issue
-
Set up rootless Podman 5.8.1 on a host (Ubuntu 24.04, kernel 6.8)
-
Create a container that uses Podman in remote mode via the host socket:
# Create a container with podman configured for remote mode
podman run -d --name test-remote \
-v /run/user/$(id -u)/podman/podman.sock:/var/run/docker.sock:ro \
docker.io/library/debian:bookworm-slim \
sleep infinity
# Install podman inside the container
podman exec test-remote bash -c 'apt-get update && apt-get install -y podman'
# Configure remote mode
podman exec test-remote bash -c 'mkdir -p /etc/containers && printf "[engine]\nremote = true\n" > /etc/containers/containers.conf'
podman exec test-remote bash -c 'export CONTAINER_HOST=unix:///var/run/docker.sock'
- Start listening for events from INSIDE the container:
podman exec test-remote podman --url unix:///var/run/docker.sock events --format json --filter event=start &
- Trigger a container start event from the HOST:
podman run --rm docker.io/library/alpine echo hello
-
Observe the output from step 3 — it prints
nullinstead of a JSON event object. -
For comparison, run the same command directly on the host (not in remote mode):
podman events --format json --filter event=start &
podman run --rm docker.io/library/alpine echo hello
# This returns proper JSON: {"ID":"...","Status":"start","Type":"container",...}
Describe the results you received
null
Describe the results you expected
A properly structured JSON event object, e.g.:
{
"ID": "abc123...",
"Status": "start",
"Type": "container",
"Action": "start",
"Attributes": { ... }
}
podman info output
host:
arch: amd64
buildahVersion: 1.43.0
cgroupControllers:
- cpuset
- cpu
- io
- memory
- hugetlb
- pids
- rdma
- misc
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon_2.1.10+ds1-1build2_amd64
path: /usr/bin/conmon
version: 'conmon version 2.1.10, commit: unknown'
cpuUtilization:
idlePercent: 88.3
systemPercent: 2.93
userPercent: 8.76
cpus: 4
databaseBackend: sqlite
distribution:
codename: noble
distribution: ubuntu
version: "24.04"
eventLogger: journald
freeLocks: 2048
hostname: saurus
idMappings:
gidmap: null
uidmap: null
kernel: 6.8.0-106-generic
linkmode: dynamic
logDriver: journald
memFree: 10440720384
memTotal: 16770109440
networkBackend: netavark
networkBackendInfo:
backend: netavark
defaultNetwork: podman
dns:
package: aardvark-dns_1.4.0-5_amd64
path: /usr/lib/podman/aardvark-dns
version: aardvark-dns 1.4.0
package: netavark_1.4.0-4_amd64
path: /usr/lib/podman/netavark
version: netavark 1.4.0
ociRuntime:
name: crun
package: crun_100:1.26-1_amd64
path: /usr/bin/crun
version: |-
crun version 1.26
commit: 3241e671f92c33b0c003cd7de319e4f32add6231
rundir: /run/user/0/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
os: linux
pasta:
executable: /usr/bin/pasta
package: passt_100:0.0+20260120.386b5f54-1_amd64
version: |
pasta 0.0+20260120.386b5f54
Copyright Red Hat
GNU General Public License, version 2 or later
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
remoteSocket:
exists: true
path: /run/podman/podman.sock
rootlessNetworkCmd: pasta
security:
apparmorEnabled: true
capabilities: CAP_AUDIT_WRITE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_MKNOD,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: false
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: false
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns_1.2.1-1build2_amd64
version: |-
slirp4netns version 1.2.1
commit: 09e31e92fa3d2a1d3ca261adaeb012c8d75a8194
libslirp: 4.7.0
SLIRP_CONFIG_VERSION_MAX: 4
libseccomp: 2.5.5
swapFree: 0
swapTotal: 0
uptime: 43h 18m 37.00s (Approximately 1.79 days)
variant: ""
plugins:
authorization: null
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /usr/share/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /var/lib/containers/storage
graphRootAllocated: 206900281344
graphRootUsed: 35465482240
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Supports shifting: "true"
Supports volatile: "true"
Using metacopy: "false"
imageCopyTmpDir: /var/tmp
imageStore:
number: 1
runRoot: /run/containers/storage
transientStore: false
volumePath: /var/lib/containers/storage/volumes
version:
APIVersion: 5.8.1
Built: 0
BuiltTime: Thu Jan 1 00:00:00 1970
GitCommit: ""
GoVersion: go1.26.0
Os: linux
OsArch: linux/amd64
Version: 5.8.1
Podman in a container
Yes
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
This issue specifically affects the Docker-compatible events API when accessed via remote mode. The same podman events --format json command works correctly when run directly on the host (non-remote, same Podman version).
Impact: This breaks the @devcontainers/cli (v0.84.0) which uses podman events --format json --filter event=start to detect container startup. The CLI crashes with TypeError: Cannot read properties of null (reading 'status') because it expects a valid JSON object but receives null.
Workaround: Patch the devcontainer CLI to treat null events as a start signal, since the container is already running after podman run — the events listener is just waiting for confirmation.
The issue does NOT occur with Podman 4.9.3 on the same host with the same socket forwarding setup.