Skip to content
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

podman run ignores --pull missing when used with --platform #24420

Closed
Molter73 opened this issue Oct 30, 2024 · 1 comment
Closed

podman run ignores --pull missing when used with --platform #24420

Molter73 opened this issue Oct 30, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote

Comments

@Molter73
Copy link

Issue Description

Running podman run --pull missing --platform "linux/amd64 <image> always pulls the image when the remote is a manifest and the local image is not.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Clone https://github.com/containers/PodmanHello
  2. Build the image with podman build --platform linux/amd64 -t quay.io/podman/hello:latest .
  3. Run the image with podman run --platform linux/amd64 --pull missing quay.io/podman/hello:latest

Describe the results you received

Image was built correctly:

$ podman build --platform linux/amd64 -t quay.io/podman/hello:latest .
[1/2] STEP 1/5: FROM docker.io/redhat/ubi9-minimal AS builder
[1/2] STEP 2/5: RUN microdnf -y install gcc glibc-static
--> Using cache 04420a4059cb04580ef8af394e962dee1229978cacbea5fc90444764d80790a4
--> 04420a4059cb
[1/2] STEP 3/5: ADD podman_hello_world.c .
--> Using cache b2b1e83bade82156e0a5cd5b6aed5c824b1886837c80cf9b6948de5c6210780a
--> b2b1e83bade8
[1/2] STEP 4/5: RUN gcc -O2 -static -o podman_hello_world podman_hello_world.c
--> Using cache f1a3097d0d187ffba9b1192f24755da3081bb93896c7460aadfd49d1b08a52ab
--> f1a3097d0d18
[1/2] STEP 5/5: RUN strip podman_hello_world
--> Using cache a7fedf8a61d90b427e02482ed568c59efa0dfc6647b9b46320eb790058a1410b
--> a7fedf8a61d9
[2/2] STEP 1/6: FROM scratch
[2/2] STEP 2/6: LABEL maintainer="Podman Maintainers"
--> Using cache fbe033948a89c3cf1b708e695c17ca0b5a7966f93edc30dc91304049b8f5ec7c
--> fbe033948a89
[2/2] STEP 3/6: LABEL artist="Máirín Ní Ḋuḃṫaiġ, X/Twitter:@mairin"
--> Using cache d2d6cc1697b6ea942231616790bc87972b9d04880adb6333c4523d547c50a736
--> d2d6cc1697b6
[2/2] STEP 4/6: LABEL io.containers.capabilities="sys_chroot"
--> Using cache b2be5a5201b274e94031f073cf8a98ba1721c62917008bc9dc931343686dea6c
--> b2be5a5201b2
[2/2] STEP 5/6: COPY --from=builder podman_hello_world /usr/local/bin/podman_hello_world
--> Using cache 1740cb98f2c465bfe8795d519acd61c9101a3e8c7d4e8e329a93b476347fcc53
--> 1740cb98f2c4
[2/2] STEP 6/6: CMD ["/usr/local/bin/podman_hello_world"]
--> Using cache 90e4b10cf292a6d7e9948dd0171d1fd57391d9ecf0b925c3a2ddc76e1a9ad793
[2/2] COMMIT quay.io/podman/hello:latest
--> 90e4b10cf292
Successfully tagged quay.io/podman/hello:latest
Successfully tagged localhost/myhello:latest
90e4b10cf292a6d7e9948dd0171d1fd57391d9ecf0b925c3a2ddc76e1a9ad793

Trying to run it triggered a pull:

$ podman run --pull missing --platform linux/amd64 --rm quay.io/podman/hello:latest
Trying to pull quay.io/podman/hello:latest...
Getting image source signatures
Copying blob sha256:81df7ff16254ed9756e27c8de9ceb02a9568228fccadbf080f41cc5eb5118a44
Copying config sha256:5dd467fce50b56951185da365b5feee75409968cbab5767b9b59e325fb2ecbc0
Writing manifest to image destination
!... Hello Podman World ...!

         .--"--.
       / -     - \
      / (O)   (O) \
   ~~~| -=(,Y,)=- |
    .---. /`  \   |~~
 ~/  o  o \~~~~.----. ~~
  | =(X)= |~  / (O (O) \
   ~~~~~~~  ~| =(Y_)=-  |
  ~~~~    ~~~|   U      |~~

Project:   https://github.com/containers/podman
Website:   https://podman.io
Desktop:   https://podman-desktop.io
Documents: https://docs.podman.io
YouTube:   https://youtube.com/@Podman
X/Twitter: @Podman_io
Mastodon:  @[email protected]

Describe the results you expected

Expect the same behavior as not using the --platform flag, which is to use the locally available image:

$ podman build --platform linux/amd64 -t quay.io/podman/hello:latest .
[1/2] STEP 1/5: FROM docker.io/redhat/ubi9-minimal AS builder
[1/2] STEP 2/5: RUN microdnf -y install gcc glibc-static
--> Using cache 04420a4059cb04580ef8af394e962dee1229978cacbea5fc90444764d80790a4
--> 04420a4059cb
...
--> 90e4b10cf292
Successfully tagged quay.io/podman/hello:latest
Successfully tagged localhost/myhello:latest
90e4b10cf292a6d7e9948dd0171d1fd57391d9ecf0b925c3a2ddc76e1a9ad793
$ podman run --pull missing --rm quay.io/podman/hello:latest
!... Hello Podman World ...!

         .--"--.
       / -     - \
      / (O)   (O) \
   ~~~| -=(,Y,)=- |
    .---. /`  \   |~~
 ~/  o  o \~~~~.----. ~~
  | =(X)= |~  / (O (O) \
   ~~~~~~~  ~| =(Y_)=-  |
  ~~~~    ~~~|   U      |~~

Project:   https://github.com/containers/podman
Website:   https://podman.io
Desktop:   https://podman-desktop.io
Documents: https://docs.podman.io
YouTube:   https://youtube.com/@Podman
X/Twitter: @Podman_io
Mastodon:  @[email protected]


### podman info output

host:
  arch: amd64
  buildahVersion: 1.37.3
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-2.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 94.53
    systemPercent: 1.36
    userPercent: 4.11
  cpus: 20
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: workstation
    version: "40"
  eventLogger: journald
  freeLocks: 1946
  hostname: *************
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.10.12-200.fc40.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 8445890560
  memTotal: 67108626432
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.12.2-2.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.12.2
    package: netavark-1.12.2-1.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.12.2
  ociRuntime:
    name: crun
    package: crun-1.17-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.17
      commit: 000fa0d4eeed8938301f3bcf8206405315bc1017
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20240906.g6b38f07-1.fc40.x86_64
    version: |
      pasta 0^20240906.g6b38f07-1.fc40.x86_64
      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: 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: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-2.fc40.x86_64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.5
  swapFree: 8405905408
  swapTotal: 8589930496
  uptime: 314h 1m 37.00s (Approximately 13.08 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: 4
    paused: 0
    running: 4
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 1022488477696
  graphRootUsed: 355116388352
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 903
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.2.3
  Built: 1727136000
  BuiltTime: Tue Sep 24 02:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.7
  Os: linux
  OsArch: linux/amd64
  Version: 5.2.3



### Podman in a container

No

### Privileged Or Rootless

Privileged

### Upstream Latest Release

No

### Additional environment details

Standard podman installed on Fedora 40 with `dnf install -y podman`

### Additional information

_No response_
@Molter73 Molter73 added the kind/bug Categorizes issue or PR as related to a bug. label Oct 30, 2024
@github-actions github-actions bot added the remote Problem is in podman-remote label Oct 30, 2024
@Luap99
Copy link
Member

Luap99 commented Oct 30, 2024

I would consider this a duplicate of #17063

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests

2 participants