Skip to content

[docs] Clarify --publishs behavior when using with podman container restore #28031

@danishprakash

Description

@danishprakash

Issue Description

podman container restore --publish only works with --import. Even though this was seemingly intended[1], we should document this behaviour.

Steps to reproduce the issue

# podman run -d --name test-ctr alpine sleep 3600
# podman container checkpoint test-ctr
# podman container restore --publish 8000:8000 test-ctr
# podman inspect test-ctr --format '{{.HostConfig.PortBindings}}'
# map[]

# podman rm -f test-ctr

podman info output

host:
  arch: amd64
  buildahVersion: 1.41.5
  cgroupControllers:
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.13-1.2.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.13, commit: unknown'
  cpuUtilization:
    idlePercent: 94.08
    systemPercent: 0.96
    userPercent: 4.96
  cpus: 16
  databaseBackend: sqlite
  distribution:
    distribution: opensuse-slowroll
    version: "20250901"
  eventLogger: journald
  freeLocks: 2048
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.16.8-1-default
  linkmode: dynamic
  logDriver: journald
  memFree: 3868430336
  memTotal: 50217230336
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.16.0-1.1.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.16.0
    package: Unknown
    path: /usr/local/libexec/podman/netavark
    version: netavark 1.17.0-dev
  ociRuntime:
    name: runc
    package: runc-1.3.1-1.1.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.3.1
      commit: v1.3.1-0-ge6457afc48ef
      spec: 1.2.1
      go: go1.24.6
      libseccomp: 2.6.0
  os: linux
  pasta:
    executable: /bin/pasta
    package: passt-20250611.0293c6f-0.x86_64
    version: |
      pasta 20250611.0293c6f-0
      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/user/1000/podman/podman.sock
  rootlessNetworkCmd: slirp4netns
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /bin/slirp4netns
    package: slirp4netns-1.3.3-1.1.x86_64
    version: |-
      slirp4netns version 1.3.3
      commit: unknown
      libslirp: 4.9.1
      SLIRP_CONFIG_VERSION_MAX: 6
      libseccomp: 2.6.0
  swapFree: 2147811328
  swapTotal: 2147811328
  uptime: 8h 51m 8.00s (Approximately 0.33 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  localhost:5000:
    Blocked: false
    Insecure: true
    Location: localhost:5000
    MirrorByDigestOnly: false
    Mirrors: null
    Prefix: localhost:5000
    PullFromMirror: ""
  search:
  - registry.suse.com
  - registry.opensuse.org
  - docker.io
store:
  configFile: /home/danishprakash/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/danishprakash/.local/share/containers/storage
  graphRootAllocated: 1021788028928
  graphRootUsed: 729065328640
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/danishprakash/.local/share/containers/storage/volumes
version:
  APIVersion: 5.6.2
  Built: 1761813496
  BuiltTime: Thu Oct 30 14:08:16 2025
  GitCommit: ""
  GoVersion: go1.25.3
  Os: linux
  OsArch: linux/amd64
  Version: 5.6.2

[1] - 1ac9198

Metadata

Metadata

Assignees

Labels

documentationIssue or fix is in project documentationkind/bugCategorizes issue or PR as related to a bug.triagedIssue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions