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

--timestamp does nothing if only instruction is from #15171

Closed
graywolf-at-work opened this issue Aug 3, 2022 · 6 comments · Fixed by #15172
Closed

--timestamp does nothing if only instruction is from #15171

graywolf-at-work opened this issue Aug 3, 2022 · 6 comments · Fixed by #15172
Labels
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.

Comments

@graywolf-at-work
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When you have a Containerfile that has only from instruction, the --timestamp
option for podman build does nothing.

Steps to reproduce the issue:

 echo 'from docker.io/library/alpine:3.16' >Containerfile && podman build --iidfile id --timestamp 0 . && podman inspect $(cat id) | jq -r .[].Created

Describe the results you received:

[..]
2022-07-18T21:00:15.928720935Z

Describe the results you expected:

[..]
1970-01-01T00:00:00Z

Additional information you deem important (e.g. issue happens only occasionally):

N/A

Output of podman version:

Client:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18.4
Git Commit:   112d29a88c7813a70b55004ec305f48630b43e12
Built:        Thu Jul 21 20:43:18 2022
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.26.1
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.2-r0
    path: /usr/bin/conmon
    version: 'conmon version 2.1.2, commit: f25214cda836296fe8695c2e582ca79d2246053a'
  cpuUtilization:
    idlePercent: 84.46
    systemPercent: 3.16
    userPercent: 12.38
  cpus: 16
  distribution:
    distribution: alpine
    version: 3.16.1
  eventLogger: file
  hostname: HOSTNAME
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1234
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1234
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.57-0-lts
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 4304928768
  memTotal: 29255086080
  networkBackend: cni
  ociRuntime:
    name: crun
    package: crun-1.4.5-r0
    path: /usr/bin/crun
    version: |-
      crun version 1.4.5
      commit: c381048530aa750495cf502ddb7181f2ded5b400
      spec: 1.0.0
      +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /var/run/1234-rdir/podman/podman.sock
  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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-r0
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.2
  swapFree: 34356596736
  swapTotal: 34359734272
  uptime: 33h 25m 58.8s (Approximately 1.38 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 4
    paused: 0
    running: 0
    stopped: 4
  graphDriverName: btrfs
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 989776052224
  graphRootUsed: 67633455104
  graphStatus:
    Build Version: Btrfs v5.17
    Library Version: "102"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 94
  runRoot: /var/run/1234-rdir/containers
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 4.1.0
  Built: 1658428998
  BuiltTime: Thu Jul 21 20:43:18 2022
  GitCommit: 112d29a88c7813a70b55004ec305f48630b43e12
  GoVersion: go1.18.4
  Os: linux
  OsArch: linux/amd64
  Version: 4.1.0

Package info (e.g. output of rpm -q podman or apt list podman):

podman-4.1.0-r2 description:
Simple management tool for pods, containers and images

podman-4.1.0-r2 webpage:
https://podman.io/

podman-4.1.0-r2 installed size:
33 MiB

podman-4.1.0-r3 description:
Simple management tool for pods, containers and images

podman-4.1.0-r3 webpage:
https://podman.io/

podman-4.1.0-r3 installed size:
33 MiB

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

No

Additional environment details (AWS, VirtualBox, physical, etc.):

N/A

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 3, 2022
@flouthoc
Copy link
Collaborator

flouthoc commented Aug 3, 2022

Hi @graywolf-at-work , Thanks for creating the issue. I think that is expected since existing image is retagged and no new image is created.

@graywolf-at-work
Copy link
Contributor Author

I will make a PR documenting this then. Thanks for explaining :)

@graywolf-at-work
Copy link
Contributor Author

I assume the man pages are build from the markdown I've edited in the PR. Is the correct or are other changes required as well?

@rhatdan
Copy link
Member

rhatdan commented Aug 3, 2022

Does this work for you.
$ ctr=$(buildah from -q fedora)
$ id=$(buildah commit -q --timestamp 0 $ctr myfedora)
$ podman inspect $id | jq -r .[].Created
1970-01-01T00:00:00Z

@graywolf-at-work
Copy link
Contributor Author

Yes, that does seem to work, thank you. However, sadly I'm limited to using podman.

@rhatdan
Copy link
Member

rhatdan commented Aug 3, 2022

We should add the --timestamp option to Podman commit. Which would satisfy your needs.

graywolf-at-work pushed a commit to graywolf-at-work/podman that referenced this issue Aug 10, 2022
mheon pushed a commit to mheon/libpod that referenced this issue Aug 10, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants